nixpkgs/pkgs/tools/games/scarab/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

86 lines
1.7 KiB
Nix

{ lib
, buildDotnetModule
, fetchFromGitHub
, glibc
, zlib
, libX11
, libICE
, libSM
, fontconfig
, gtk3
, copyDesktopItems
, icoutils
, wrapGAppsHook3
, makeDesktopItem
}:
buildDotnetModule rec {
pname = "scarab";
version = "2.5.0.0";
src = fetchFromGitHub {
owner = "fifty-six";
repo = pname;
rev = "v${version}";
sha256 = "sha256-z1hmMrfeoYyjVEPPjWvUfKUKsOS7UsocSWMYrFY+/kI=";
};
nugetDeps = ./deps.nix;
projectFile = "Scarab.sln";
executables = [ "Scarab" ];
runtimeDeps = [
glibc
zlib
libX11
libICE
libSM
fontconfig
gtk3
];
buildInputs = [
gtk3
];
nativeBuildInputs = [
copyDesktopItems
icoutils
wrapGAppsHook3
];
postFixup = ''
# Icons for the desktop file
icotool -x $src/Scarab/Assets/omegamaggotprime.ico
sizes=(256 128 64 48 32 16)
for i in ''${!sizes[@]}; do
size=''${sizes[$i]}x''${sizes[$i]}
install -D omegamaggotprime_''$((i+1))_''${size}x32.png $out/share/icons/hicolor/$size/apps/scarab.png
done
'';
desktopItems = [(makeDesktopItem {
desktopName = "Scarab";
name = "scarab";
exec = "Scarab";
icon = "scarab";
comment = meta.description;
type = "Application";
categories = [ "Game" ];
})];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Hollow Knight mod installer and manager";
homepage = "https://github.com/fifty-six/Scarab";
downloadPage = "https://github.com/fifty-six/Scarab/releases";
changelog = "https://github.com/fifty-six/Scarab/releases/tag/v${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ huantian ];
mainProgram = "Scarab";
platforms = platforms.linux;
};
}