git.iko.soy/typeable/nixpkgs
on master help sign in
andyetitmoves: deprecate phases and refactor
commiteb301258ef2aa4c95245311a2e888a12ac0fd811 authorFelix Buehler <account@buehler.rocks> dateMon 3 Jan 2022, 15:07 (5 years ago) parentc912162
1 file changed+34−33
pkgs/games/andyetitmoves/default.nix+34−33
pkgs/games/andyetitmoves/default.nix+34−33
@@ -2,38 +2,43 @@
22
33stdenv.mkDerivation rec {
44 pname = "andyetitmoves";
5− version = "1.2.2";
5+ version = "1.2.2";
66
7− src = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"
7+ src =
8+ if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"
89 then
9− let postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
10− commercialName = "${pname}-${version}_${postfix}.tar.gz";
11− demoUrl = "http://www.andyetitmoves.net/demo/${pname}Demo-${version}_${postfix}.tar.gz";
10+ let
11+ postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
12+ commercialName = "${pname}-${version}_${postfix}.tar.gz";
13+ demoUrl = "http://www.andyetitmoves.net/demo/${pname}Demo-${version}_${postfix}.tar.gz";
1214 in
1315 if commercialVersion
14− then requireFile {
15− message = ''
16− We cannot download the commercial version automatically, as you require a license.
17− Once you bought a license, you need to add your downloaded version to the nix store.
18− You can do this by using "nix-prefetch-url file:///\$PWD/${commercialName}" in the
19− directory where yousaved it.
20− '';
21− name = commercialName;
22− sha256 = if stdenv.hostPlatform.system == "i686-linux"
23− then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
24− else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
25− }
26− else fetchurl {
27− url = demoUrl;
28− sha256 = if stdenv.hostPlatform.system == "i686-linux"
29− then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
30− else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
31− }
16+ then
17+ requireFile
18+ {
19+ message = ''
20+ We cannot download the commercial version automatically, as you require a license.
21+ Once you bought a license, you need to add your downloaded version to the nix store.
22+ You can do this by using "nix-prefetch-url file:///\$PWD/${commercialName}" in the
23+ directory where yousaved it.
24+ '';
25+ name = commercialName;
26+ sha256 =
27+ if stdenv.hostPlatform.system == "i686-linux"
28+ then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
29+ else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
30+ }
31+ else
32+ fetchurl {
33+ url = demoUrl;
34+ sha256 =
35+ if stdenv.hostPlatform.system == "i686-linux"
36+ then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
37+ else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
38+ }
3239 else
3340 throw "And Yet It Moves nix package only supports linux and intel cpu's.";
3441
35− phases = "unpackPhase installPhase";
36−
3742 installPhase = ''
3843 mkdir -p $out/{opt/andyetitmoves,bin}
3944 cp -r * $out/opt/andyetitmoves/
@@ -54,19 +59,15 @@ stdenv.mkDerivation rec {
5459 chmod +x $out/bin/$binName
5560 '';
5661
57− buildInputs = [libvorbis libogg libtheora SDL libXft SDL_image zlib libX11 libpng openal];
62+ buildInputs = [ libvorbis libogg libtheora SDL libXft SDL_image zlib libX11 libpng openal ];
5863
59− meta = {
64+ meta = with lib; {
6065 description = "Physics/Gravity Platform game";
61−
6266 longDescription = ''
6367 And Yet It Moves is an award-winning physics-based platform game in which players rotate the game world at will to solve challenging puzzles. Tilting the world turns walls into floors, slides into platforms, and stacks of rocks into dangerous hazards.
6468 '';
65−
6669 homepage = "http://www.andyetitmoves.net/";
67−
68− license = lib.licenses.unfree;
69−
70− maintainers = with lib.maintainers; [bluescreen303];
70+ license = licenses.unfree;
71+ maintainers = with maintainers; [ bluescreen303 ];
7172 };
7273}