ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / sy / system-syzygy / package.nix
blobd321284b74279dd67fbbc8d6ae4eec660ff9222c
1 { stdenv, lib, rustPlatform, fetchFromGitHub, SDL2, makeWrapper, makeDesktopItem}:
3 let
4   desktopFile = makeDesktopItem {
5     name = "system-syzygy";
6     exec = "@out@/bin/syzygy";
7     comment = "A puzzle game";
8     desktopName = "System Syzygy";
9     categories = [ "Game" ];
10   };
12 rustPlatform.buildRustPackage rec {
13   pname = "system-syzygy";
14   version = "1.0.1";
16   src = fetchFromGitHub {
17     owner = "mdsteele";
18     repo = "syzygy";
19     rev = "5ba148fed7aae14bf35108d7303e4194e8ffe5e8";
20     sha256 = "07mzwx8ql33q865snnw4gm3dgf0mnm60lnq1f5fgas2yjy9g9vwa";
21   };
23   nativeBuildInputs = [ makeWrapper ];
24   buildInputs = [ SDL2 ];
26   cargoLock = {
27     lockFile = ./Cargo.lock;
28     outputHashes = {
29       "ahi-0.1.0" = "sha256-EliAObznLP1wkk8r3c3hhB300HYnEd9N6CJW+xG6bxE=";
30       "itersynth-0.1.0" = "sha256-dXQ+uBFchcnOjKF/CcS+AwhzFzejk2JCvvKMfS64RRQ=";
31       "sdl2-0.31.0" = "sha256-wTam0hwiajdw/ub2yM6q7+50Y3AueStcK5HLa65Y2XQ=";
32       "winres-0.1.6" = "sha256-7jYrgc3BV2UmzfACc/xyYsTkaXBPfn+bLmwdrcBe1O0=";
33     };
34   };
36   postInstall = ''
37     mkdir -p $out/share/syzygy/
38     cp -r ${src}/data/* $out/share/syzygy/
39     wrapProgram $out/bin/syzygy --set SYZYGY_DATA_DIR $out/share/syzygy
40     mkdir -p $out/share/applications
41     substituteAll ${desktopFile}/share/applications/system-syzygy.desktop $out/share/applications/system-syzygy.desktop
42   '';
45   meta = with lib; {
46     broken = stdenv.hostPlatform.isDarwin;
47     description = "Story and a puzzle game, where you solve a variety of puzzle";
48     mainProgram = "syzygy";
49     homepage = "https://mdsteele.games/syzygy";
50     license = licenses.gpl3Plus;
51     maintainers = [ maintainers.marius851000 ];
52   };