forked from mirrors/nixpkgs
Merge pull request #12026 from rycee/migrate/stdenv
Migrate packages in games to stdenv from builderDefsPackage
This commit is contained in:
commit
bea60e1409
7 changed files with 124 additions and 254 deletions
|
@ -1,53 +1,26 @@
|
||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl, allegro }:
|
||||||
, allegro
|
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
[];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "atanks-${version}";
|
||||||
sourceInfo = rec {
|
version = "6.2";
|
||||||
baseName="atanks";
|
|
||||||
version = "6.2";
|
src = fetchurl {
|
||||||
name="${baseName}-${version}";
|
url = "mirror://sourceforge/project/atanks/atanks/${name}/${name}.tar.gz";
|
||||||
project="${baseName}";
|
|
||||||
url="mirror://sourceforge/project/${project}/${baseName}/${name}/${name}.tar.gz";
|
|
||||||
sha256 = "1s1lb87ind0y9d6hmfaf1b9wks8q3hd6w5n9dibq75rxqmcfvlpy";
|
sha256 = "1s1lb87ind0y9d6hmfaf1b9wks8q3hd6w5n9dibq75rxqmcfvlpy";
|
||||||
};
|
};
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
buildInputs = [ allegro ];
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
/* doConfigure should be removed if not needed */
|
patchPhase = ''
|
||||||
phaseNames = ["fixInstall" "doMakeInstall"];
|
substituteInPlace Makefile --replace /usr $out
|
||||||
makeFlags=[
|
'';
|
||||||
"PREFIX=$out/"
|
|
||||||
];
|
makeFlags = [ "PREFIX=$(out)/" "INSTALL=install" ];
|
||||||
fixInstall = a.fullDepEntry (''
|
|
||||||
sed -e "s@INSTALL=.*bin/install @INSTALL=install @" -i Makefile
|
meta = with stdenv.lib; {
|
||||||
sed -e "s@-g 0 -m ... -o 0@@" -i Makefile
|
|
||||||
sed -e 's@/usr/@'"$out"'@g' -i Makefile
|
|
||||||
'') ["doUnpack" "minInit"];
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Atomic Tanks ballistics game";
|
description = "Atomic Tanks ballistics game";
|
||||||
maintainers = with a.lib.maintainers;
|
homepage = http://atanks.sourceforge.net/;
|
||||||
[
|
maintainers = [ maintainers.raskin ];
|
||||||
raskin
|
platforms = platforms.linux;
|
||||||
];
|
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
downloadPage = "http://sourceforge.net/projects/atanks/files/atanks/";
|
|
||||||
inherit version;
|
|
||||||
};
|
};
|
||||||
}) x
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
url http://sourceforge.net/projects/atanks/files/atanks/
|
|
||||||
version_link 'atanks[-][0-9.]+/$'
|
|
||||||
version_link '[.]tar[.][a-z0-9]+/download'
|
|
||||||
SF_redirect
|
|
||||||
do_overwrite () { do_overwrite_just_version; }
|
|
|
@ -1,11 +1,20 @@
|
||||||
a @ { xproto, libX11, libXrender
|
{ stdenv, fetchurl, xproto, libX11, libXrender
|
||||||
, gmp, mesa, libjpeg, libpng
|
, gmp, mesa, libjpeg, libpng
|
||||||
, expat, gettext, perl
|
, expat, gettext, perl, guile
|
||||||
, SDL, SDL_image, SDL_mixer, SDL_ttf
|
, SDL, SDL_image, SDL_mixer, SDL_ttf
|
||||||
, curl, sqlite
|
, curl, sqlite
|
||||||
, libogg, libvorbis, libcaca, csound, cunit, ... } :
|
, libogg, libvorbis, libcaca, csound, cunit } :
|
||||||
let
|
|
||||||
buildInputs = with a; [
|
stdenv.mkDerivation rec {
|
||||||
|
name = "liquidwar6-${version}";
|
||||||
|
version = "0.6.3902";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://gnu/liquidwar6/${name}.tar.gz";
|
||||||
|
sha256 = "1976nnl83d8wspjhb5d5ivdvdxgb8lp34wp54jal60z4zad581fn";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
xproto libX11 gmp guile
|
xproto libX11 gmp guile
|
||||||
mesa libjpeg libpng
|
mesa libjpeg libpng
|
||||||
expat gettext perl
|
expat gettext perl
|
||||||
|
@ -14,34 +23,15 @@ let
|
||||||
libogg libvorbis csound
|
libogg libvorbis csound
|
||||||
libXrender libcaca cunit
|
libXrender libcaca cunit
|
||||||
];
|
];
|
||||||
in
|
|
||||||
rec {
|
|
||||||
name = "liquidwar6-${meta.version}";
|
|
||||||
|
|
||||||
src = a.fetchurl {
|
# To avoid problems finding SDL_types.h.
|
||||||
url = "mirror://gnu/liquidwar6/${name}.tar.gz";
|
configureFlags = [ "CFLAGS=-I${SDL}/include/SDL" ];
|
||||||
sha256 = "1976nnl83d8wspjhb5d5ivdvdxgb8lp34wp54jal60z4zad581fn";
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit buildInputs;
|
meta = with stdenv.lib; {
|
||||||
configureFlags = [];
|
|
||||||
|
|
||||||
/* doConfigure should be removed if not needed */
|
|
||||||
phaseNames = ["setVars" "doConfigure" "doMakeInstall"];
|
|
||||||
|
|
||||||
setVars = a.noDepEntry (''
|
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL"
|
|
||||||
'');
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Quick tactics game";
|
description = "Quick tactics game";
|
||||||
maintainers = [
|
homepage = "http://www.gnu.org/software/liquidwar6/";
|
||||||
a.lib.maintainers.raskin
|
maintainers = [ maintainers.raskin ];
|
||||||
];
|
license = licenses.gpl3Plus;
|
||||||
platforms = with a.lib.platforms;
|
platforms = platforms.linux;
|
||||||
linux;
|
|
||||||
homepage = "http://www.gnu.org/software/liquidwar6/";
|
|
||||||
version = "0.6.3902";
|
|
||||||
updateWalker=true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,77 +1,56 @@
|
||||||
x@{builderDefsPackage
|
{ stdenv, fetchsvn, mesa, SDL, SDL_image, SDL_mixer
|
||||||
, fetchsvn, mesa, SDL, SDL_image, SDL_mixer
|
, libpng, zlib, libjpeg, imagemagick, libX11
|
||||||
, libpng, zlib, libjpeg, imagemagick, libX11
|
}:
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
["fetchsvn"];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "sauerbraten-r${version}";
|
||||||
sourceInfo = rec {
|
version = "5000";
|
||||||
baseName="sauerbraten";
|
|
||||||
version="5000";
|
src = fetchsvn {
|
||||||
name="${baseName}-r${version}";
|
url = "https://svn.code.sf.net/p/sauerbraten/code";
|
||||||
url="https://svn.code.sf.net/p/sauerbraten/code";
|
sha256 = "17libj7dslprlwppdk3vyxdcigbsa4czln8gdyz9j264m11z1cbh";
|
||||||
hash="17libj7dslprlwppdk3vyxdcigbsa4czln8gdyz9j264m11z1cbh";
|
rev = version;
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
srcDrv = a.fetchsvn {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
rev = sourceInfo.version;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
src = srcDrv + "/";
|
buildInputs = [
|
||||||
|
mesa SDL SDL_image SDL_mixer libpng zlib libjpeg imagemagick
|
||||||
|
libX11
|
||||||
|
];
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
preBuild = ''
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
phaseNames = ["setVars" "doMakeInstall" "doCreateScripts"];
|
|
||||||
|
|
||||||
setVars = a.noDepEntry ''
|
|
||||||
export NIX_LDFLAGS="$NIX_LDFLAGS -lX11"
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lX11"
|
||||||
|
pushd src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doUnpack = a.fullDepEntry ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/sauerbraten/build-dir
|
popd
|
||||||
ln -s $out/share/sauerbraten/build-dir
|
mkdir -p $out/bin $out/share/sauerbraten $out/share/doc/sauerbraten
|
||||||
cd $out/share/sauerbraten/build-dir
|
cp -rv "docs/"* $out/share/doc/sauerbraten/
|
||||||
(cd ${src}; find . -type d) | tail -n +2 | xargs -L 1 mkdir
|
cp -v src/sauer_client src/sauer_server $out/share/sauerbraten/
|
||||||
(cd ${src}; find . -type f) | while read; do ln -s ${src}/"$REPLY" "$(dirname "$REPLY")"; done
|
cp -rv packages $out/share/sauerbraten/
|
||||||
cd src
|
cp -rv data $out/share/sauerbraten/
|
||||||
ls
|
cat > $out/bin/sauerbraten_server <<EOF
|
||||||
make clean
|
#!${stdenv.shell}
|
||||||
sed -e '/[.]h[.]gch/,/-o/s@-o@-x c++-header -o@' -i Makefile
|
cd $out/share/sauerbraten
|
||||||
'' ["minInit" "addInputs" "defEnsureDir"];
|
./sauer_server "\$@"
|
||||||
|
EOF
|
||||||
doCreateScripts = a.fullDepEntry ''
|
cat > $out/bin/sauerbraten_client <<EOF
|
||||||
cd ..
|
#!${stdenv.shell}
|
||||||
mkdir -p $out/bin
|
cd $out/share/sauerbraten
|
||||||
echo '#! /bin/sh' >> $out/bin/sauerbraten_server
|
./sauer_client "\$@"
|
||||||
echo 'cd "'"$out"'/share/sauerbraten/build-dir"' >> $out/bin/sauerbraten_server
|
EOF
|
||||||
echo './bin_unix/native_server "$@"' >> $out/bin/sauerbraten_server
|
|
||||||
echo '#! /bin/sh' >> $out/bin/sauerbraten_client
|
|
||||||
echo 'cd "'"$out"'/share/sauerbraten/build-dir"' >> $out/bin/sauerbraten_client
|
|
||||||
echo './bin_unix/native_client "$@"' >> $out/bin/sauerbraten_client
|
|
||||||
chmod a+x $out/bin/sauerbraten_*
|
chmod a+x $out/bin/sauerbraten_*
|
||||||
'' ["minInit" "defEnsureDir"];
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "";
|
description = "";
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = [ maintainers.raskin ];
|
||||||
[
|
|
||||||
raskin
|
|
||||||
];
|
|
||||||
hydraPlatforms =
|
hydraPlatforms =
|
||||||
# raskin: tested amd64-linux;
|
# raskin: tested amd64-linux;
|
||||||
# not setting platforms because it is 0.5+ GiB of game data
|
# not setting platforms because it is 0.5+ GiB of game data
|
||||||
[];
|
[];
|
||||||
license = "freeware"; # as an aggregate - data files have different licenses
|
license = "freeware"; # as an aggregate - data files have different licenses
|
||||||
# code is under zlib license
|
# code is under zlib license
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}) x
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,62 +1,31 @@
|
||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl, zlib, libtiff, libxml2, SDL, xproto, libX11
|
||||||
, zlib, libtiff, libxml2, SDL, xproto, libX11, libXi, inputproto, libXmu
|
, libXi, inputproto, libXmu, libXext, xextproto, mesa }:
|
||||||
, libXext, xextproto, mesa
|
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
[];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "stardust-${version}";
|
||||||
sourceInfo = rec {
|
version = "0.1.13";
|
||||||
baseName="stardust";
|
|
||||||
version="0.1.13";
|
src = fetchurl {
|
||||||
name="${baseName}-${version}";
|
url = "http://iwar.free.fr/IMG/gz/${name}.tar.gz";
|
||||||
url="http://iwar.free.fr/IMG/gz/${name}.tar.gz";
|
sha256 = "19rs9lz5y5g2yiq1cw0j05b11digw40gar6rw8iqc7bk3s8355xp";
|
||||||
hash="19rs9lz5y5g2yiq1cw0j05b11digw40gar6rw8iqc7bk3s8355xp";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
buildInputs = [
|
||||||
inherit buildInputs;
|
zlib libtiff libxml2 SDL xproto libX11 libXi inputproto
|
||||||
|
libXmu libXext xextproto mesa
|
||||||
/* doConfigure should be removed if not needed */
|
|
||||||
phaseNames = ["doConfigure" "fixPaths" "doMakeInstall"];
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"--bindir=$out/bin"
|
|
||||||
"--datadir=$out/share"
|
|
||||||
];
|
|
||||||
|
|
||||||
makeFlags = [
|
|
||||||
"bindir=$out/bin"
|
|
||||||
"datadir=$out/share"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fixPaths = a.fullDepEntry (''
|
installFlags = [ "bindir=\${out}/bin" ];
|
||||||
sed -e "s@#define PACKAGE .*@#define PACKAGE \"stardust\"@" -i config.h
|
|
||||||
'') ["minInit"];
|
|
||||||
|
|
||||||
meta = {
|
postConfigure = ''
|
||||||
|
substituteInPlace config.h \
|
||||||
|
--replace '#define PACKAGE ""' '#define PACKAGE "stardust"'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
description = "Space flight simulator";
|
description = "Space flight simulator";
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = [ maintainers.raskin ];
|
||||||
[
|
platforms = platforms.linux;
|
||||||
raskin
|
license = licenses.gpl2Plus;
|
||||||
];
|
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
};
|
};
|
||||||
passthru = {
|
}
|
||||||
updateInfo = {
|
|
||||||
downloadPage = "http://iwar.free.fr/article.php3?id_article=6";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) x
|
|
||||||
|
|
||||||
|
|
|
@ -1,64 +1,28 @@
|
||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl, qt4, box2d, which, cmake }:
|
||||||
, qt4, box2d, which
|
|
||||||
,fetchsvn, cmake
|
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
["fetchsvn"];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "tbe-${version}";
|
||||||
sourceInfo = rec {
|
version = "0.9.2.1";
|
||||||
baseName="tbe";
|
|
||||||
revision="2048";
|
src = fetchurl {
|
||||||
version="r${revision}";
|
url = "https://github.com/kaa-ching/tbe/archive/v${version}.tar.gz";
|
||||||
name="${baseName}-${version}";
|
sha256 = "1cs4q9qiakfd2m1lvfsvfgf8yvhxzmc06glng5d80piwyn6ymzxg";
|
||||||
url="https://tbe.svn.sourceforge.net/svnroot/tbe/trunk";
|
|
||||||
hash="19pqpkil4r5y9j4nszkbs70lq720nvqw8g8magd8nf2n3l9nqm51";
|
|
||||||
};
|
};
|
||||||
in
|
|
||||||
rec {
|
|
||||||
srcDrv = a.fetchsvn {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
rev = sourceInfo.revision;
|
|
||||||
};
|
|
||||||
src = srcDrv + "/";
|
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
buildInputs = [ qt4 box2d which cmake ];
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
phaseNames = ["setVars" "doCmake" "doMakeInstall" "doDeploy"];
|
installPhase = ''
|
||||||
|
make DESTDIR=.. install
|
||||||
setVars = a.noDepEntry ''
|
mkdir -p $out/bin
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.box2d}/include/Box2D"
|
cp ../usr/games/tbe $out/bin
|
||||||
|
cp -r ../usr/share $out/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doDeploy = a.fullDepEntry ''
|
meta = with stdenv.lib; {
|
||||||
mkdir -p "$out/share/tbe"
|
|
||||||
cp -r . "$out/share/tbe/build-dir"
|
|
||||||
mkdir -p "$out/bin"
|
|
||||||
echo '#!${a.stdenv.shell}' >> "$out/bin/tbe"
|
|
||||||
echo "$out/share/tbe/build-dir/tbe \"\$@\"" >> "$out/bin/tbe"
|
|
||||||
chmod a+x "$out/bin/tbe"
|
|
||||||
'' ["minInit" "doMake" "defEnsureDir"];
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "A physics-based game vaguely similar to Incredible Machine";
|
description = "A physics-based game vaguely similar to Incredible Machine";
|
||||||
maintainers = with a.lib.maintainers;
|
homepage = http://the-butterfly-effect.org/;
|
||||||
[
|
maintainers = [ maintainers.raskin ];
|
||||||
raskin
|
platforms = platforms.linux;
|
||||||
];
|
license = licenses.gpl2;
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
license = a.stdenv.lib.licenses.gpl2;
|
|
||||||
};
|
};
|
||||||
passthru = {
|
}
|
||||||
inherit srcDrv;
|
|
||||||
updateInfo = {
|
|
||||||
downloadPage = "http://sourceforge.net/projects/tbe/files/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) x
|
|
||||||
|
|
|
@ -14138,7 +14138,7 @@ let
|
||||||
|
|
||||||
lincity_ng = callPackage ../games/lincity/ng.nix {};
|
lincity_ng = callPackage ../games/lincity/ng.nix {};
|
||||||
|
|
||||||
liquidwar = builderDefsPackage (callPackage ../games/liquidwar) {
|
liquidwar = callPackage ../games/liquidwar {
|
||||||
guile = guile_1_8;
|
guile = guile_1_8;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue