···11{ lib, stdenv, fetchurl, libvorbis, libogg, libtheora, SDL, libXft, SDL_image, zlib, libX11, libpng, openal, runtimeShell, requireFile, commercialVersion ? false }:
2233-let plainName = "andyetitmoves";
44- version = "1.2.2";
55-in
66-77-stdenv.mkDerivation {
88- name = "${plainName}-${version}";
33+stdenv.mkDerivation rec {
44+ pname = "andyetitmoves";
55+ version = "1.2.2";
96107 src = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"
118 then
129 let postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
1313- commercialName = "${plainName}-${version}_${postfix}.tar.gz";
1414- demoUrl = "http://www.andyetitmoves.net/demo/${plainName}Demo-${version}_${postfix}.tar.gz";
1010+ commercialName = "${pname}-${version}_${postfix}.tar.gz";
1111+ demoUrl = "http://www.andyetitmoves.net/demo/${pname}Demo-${version}_${postfix}.tar.gz";
1512 in
1613 if commercialVersion
1714 then requireFile {
+8-7
pkgs/games/arena/default.nix
···12121313in
1414stdenv.mkDerivation rec {
1515- name = "arena-3.10-beta";
1515+ pname = "arena";
1616+ version = "3.10-beta";
16171718 src = fetchurl {
1818- url = "http://www.playwitharena.de/downloads/arenalinux_64bit_3.10beta.tar.gz";
1919+ url = "http://www.playwitharena.de/downloads/arenalinux_64bit_${lib.replaceStrings ["-"] [""] version}.tar.gz";
1920 sha256 = "1pzb9sg4lzbbi4gbldvlb85p8xyl9xnplxwyb9pkk2mwzvvxkf0d";
2021 };
2122···2526 unpackPhase = ''
2627 # This is is a tar bomb, i.e. it extract a dozen files and directories to
2728 # the top-level, so we must create a sub-directory first.
2828- mkdir -p $out/lib/${name}
2929- tar -C $out/lib/${name} -xf ${src}
2929+ mkdir -p $out/lib/${pname}-${version}
3030+ tar -C $out/lib/${pname}-${version} -xf ${src}
30313132 # Remove executable bits from data files. This matters for the find command
3233 # we'll use below to find all bundled engines.
3333- chmod -x $out/lib/${name}/Engines/*/*.{txt,bin,bmp,zip}
3434+ chmod -x $out/lib/${pname}-${version}/Engines/*/*.{txt,bin,bmp,zip}
3435 '';
35363637 buildPhase = ''
3738 # Arena has (at least) two executables plus a couple of bundled chess
3839 # engines that we need to patch.
3940 exes=( $(find $out -name '*x86_64_linux')
4040- $(find $out/lib/${name}/Engines -type f -perm /u+x)
4141+ $(find $out/lib/${pname}-${version}/Engines -type f -perm /u+x)
4142 )
4243 for i in "''${exes[@]}"; do
4344 # Arminius is statically linked.
···52535354 installPhase = ''
5455 mkdir -p $out/bin
5555- ln -s $out/lib/${name}/Arena_x86_64_linux $out/bin/arena
5656+ ln -s $out/lib/${pname}-${version}/Arena_x86_64_linux $out/bin/arena
5657 '';
57585859 dontStrip = true;
···11{ lib, stdenv, requireFile, SDL, libpulseaudio, alsa-lib, runtimeShell }:
2233stdenv.mkDerivation rec {
44- name = "vessel-12082012";
44+ pname = "vessel";
55+ version = "12082012";
5667 goBuyItNow = ''
78 We cannot download the full version automatically, as you require a license.
89 Once you bought a license, you need to add your downloaded version to the nix store.
99- You can do this by using "nix-prefetch-url file://\$PWD/${name}-bin" in the
1010+ You can do this by using "nix-prefetch-url file://\$PWD/vessel-${version}-bin" in the
1011 directory where you saved it.
1112 '';
12131314 src = if (stdenv.isi686) then
1415 requireFile {
1516 message = goBuyItNow;
1616- name = "${name}-bin";
1717+ name = "vessel-${version}-bin";
1718 sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96";
1819 } else throw "unsupported platform ${stdenv.hostPlatform.system} only i686-linux supported for now.";
1920