Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.3 KiB
Nix

{
stdenv,
lib,
rustPlatform,
fetchFromGitHub,
SDL2,
makeWrapper,
makeDesktopItem,
}:
let
desktopFile = makeDesktopItem {
name = "system-syzygy";
exec = "@out@/bin/syzygy";
comment = "A puzzle game";
desktopName = "System Syzygy";
categories = [ "Game" ];
};
in
rustPlatform.buildRustPackage rec {
pname = "system-syzygy";
version = "1.0.2";
src = fetchFromGitHub {
owner = "mdsteele";
repo = "syzygy";
tag = "v${version}";
hash = "sha256-wxe9+r3tWRXiznvjvxsmTgUC7YVKgbt+I3Q8A/WtcN0=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ SDL2 ];
cargoHash = "sha256-H/iG6vsmtpBGYBBqNQG5EpyZaUtfXfVaHv4fkxwqrD0=";
postInstall = ''
mkdir -p $out/share/syzygy/
cp -r ${src}/data/* $out/share/syzygy/
wrapProgram $out/bin/syzygy --set SYZYGY_DATA_DIR $out/share/syzygy
mkdir -p $out/share/applications
substituteAll ${desktopFile}/share/applications/system-syzygy.desktop $out/share/applications/system-syzygy.desktop
'';
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Story and a puzzle game, where you solve a variety of puzzle";
mainProgram = "syzygy";
homepage = "https://mdsteele.games/syzygy";
license = licenses.gpl3Plus;
maintainers = [ maintainers.marius851000 ];
};
}