1 { lib, stdenv, fetchurl, libvorbis, libogg, libtheora, SDL, libXft, SDL_image, zlib, libX11, libpng, openal, runtimeShell, requireFile, commercialVersion ? false }:
3 stdenv.mkDerivation rec {
4 pname = "andyetitmoves";
8 if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"
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";
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.
25 name = commercialName;
27 if stdenv.hostPlatform.system == "i686-linux"
28 then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
29 else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
35 if stdenv.hostPlatform.system == "i686-linux"
36 then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
37 else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
40 throw "And Yet It Moves nix package only supports linux and intel cpu's.";
43 mkdir -p $out/{opt/andyetitmoves,bin}
44 cp -r * $out/opt/andyetitmoves/
46 fullPath=${lib.getLib stdenv.cc.cc}/lib64
47 for i in $nativeBuildInputs; do
48 fullPath=$fullPath''${fullPath:+:}$i/lib
51 binName=${if commercialVersion then "AndYetItMoves" else "AndYetItMovesDemo"}
53 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
54 cat > $out/bin/$binName << EOF
56 cd $out/opt/andyetitmoves
59 chmod +x $out/bin/$binName
62 buildInputs = [ libvorbis libogg libtheora SDL libXft SDL_image zlib libX11 libpng openal ];
65 description = "Physics/Gravity Platform game";
67 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.
69 homepage = "http://www.andyetitmoves.net/";
70 license = licenses.unfree;
71 maintainers = with maintainers; [ bluescreen303 ];