2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, fetchurl, SDL2, makeWrapper, makeDesktopItem}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
desktopFile = makeDesktopItem {
|
|
|
|
name = "system-syzygy";
|
|
|
|
exec = "@out@/bin/syzygy";
|
|
|
|
comment = "A puzzle game";
|
|
|
|
desktopName = "System Syzygy";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Game" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "system-syzygy";
|
|
|
|
version = "1.0.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mdsteele";
|
|
|
|
repo = "syzygy";
|
|
|
|
rev = "5ba148fed7aae14bf35108d7303e4194e8ffe5e8";
|
|
|
|
sha256 = "07mzwx8ql33q865snnw4gm3dgf0mnm60lnq1f5fgas2yjy9g9vwa";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ SDL2 ];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "1jp9wnavq92w52ksj2q9fi3y58wq7ybfkx2kfbx2i2xv8d7y88ax";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A story and a puzzle game, where you solve a variety of puzzle";
|
|
|
|
homepage = "https://mdsteele.games/syzygy";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.marius851000 ];
|
|
|
|
};
|
|
|
|
}
|