2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, buildDotnetModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, glibc
|
|
|
|
, zlib
|
|
|
|
, libX11
|
|
|
|
, libICE
|
|
|
|
, libSM
|
|
|
|
, fontconfig
|
|
|
|
, gtk3
|
|
|
|
, copyDesktopItems
|
2023-07-15 17:15:38 +00:00
|
|
|
, icoutils
|
2022-08-12 12:06:08 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildDotnetModule rec {
|
|
|
|
pname = "scarab";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2.1.0.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fifty-six";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-TbsCj30ZlZmm+i/k31eo9X+XE9Zu13uL9QZOGaRm9zs=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
projectFile = "Scarab.sln";
|
|
|
|
executables = [ "Scarab" ];
|
|
|
|
|
|
|
|
runtimeDeps = [
|
|
|
|
glibc
|
|
|
|
zlib
|
|
|
|
libX11
|
|
|
|
libICE
|
|
|
|
libSM
|
|
|
|
fontconfig
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
copyDesktopItems
|
2023-07-15 17:15:38 +00:00
|
|
|
icoutils
|
2022-08-12 12:06:08 +00:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
# 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
|
2022-08-12 12:06:08 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItems = [(makeDesktopItem {
|
|
|
|
desktopName = "Scarab";
|
|
|
|
name = "scarab";
|
|
|
|
exec = "Scarab";
|
|
|
|
icon = "scarab";
|
|
|
|
comment = meta.description;
|
|
|
|
type = "Application";
|
|
|
|
categories = [ "Game" ];
|
|
|
|
})];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|