17 commercialVersion ? false,
20 stdenv.mkDerivation rec {
21 pname = "andyetitmoves";
25 if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then
27 postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
28 commercialName = "${pname}-${version}_${postfix}.tar.gz";
29 demoUrl = "http://www.andyetitmoves.net/demo/${pname}Demo-${version}_${postfix}.tar.gz";
31 if commercialVersion then
34 We cannot download the commercial version automatically, as you require a license.
35 Once you bought a license, you need to add your downloaded version to the nix store.
36 You can do this by using "nix-prefetch-url file:///\$PWD/${commercialName}" in the
37 directory where yousaved it.
39 name = commercialName;
41 if stdenv.hostPlatform.system == "i686-linux" then
42 "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
44 "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
50 if stdenv.hostPlatform.system == "i686-linux" then
51 "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
53 "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
56 throw "And Yet It Moves nix package only supports linux and intel cpu's.";
59 mkdir -p $out/{opt/andyetitmoves,bin}
60 cp -r * $out/opt/andyetitmoves/
62 fullPath=${lib.getLib stdenv.cc.cc}/lib64
63 for i in $nativeBuildInputs; do
64 fullPath=$fullPath''${fullPath:+:}$i/lib
67 binName=${if commercialVersion then "AndYetItMoves" else "AndYetItMovesDemo"}
69 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
70 cat > $out/bin/$binName << EOF
72 cd $out/opt/andyetitmoves
75 chmod +x $out/bin/$binName
92 description = "Physics/Gravity Platform game";
94 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.
96 homepage = "http://www.andyetitmoves.net/";
97 license = licenses.unfree;
98 maintainers = with maintainers; [ bluescreen303 ];