Merge remote-tracking branch 'origin/master' into stdenv-updates

This commit is contained in:
Eelco Dolstra
2013-02-15 13:36:34 +01:00
302 changed files with 14276 additions and 4226 deletions

View File

@@ -1,5 +1,5 @@
{stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
, mesa, openal}:
, mesa, openal, alsaOss }:
stdenv.mkDerivation {
name = "minecraft-1.4.7";
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
# wrapper for minecraft
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${jre}/lib/${jre.architecture}/:${libX11}/lib/:${libXext}/lib/:${libXcursor}/lib/:${libXrandr}/lib/:${libXxf86vm}/lib/:${mesa}/lib/:${openal}/lib/
${jre}/bin/java -jar $out/minecraft.jar
${alsaOss}/bin/aoss ${jre}/bin/java -jar $out/minecraft.jar
EOF
chmod +x $out/bin/minecraft

View File

@@ -0,0 +1,40 @@
{ stdenv, fetchgit, cmake, irrlicht3843, libpng12, bzip2,
libjpeg, libXxf86vm, mesa, openal, libvorbis, x11 }:
let
version = "0.4.4";
sources = {
src = fetchgit {
url = "https://github.com/celeron55/minetest.git";
rev = "ab06fca4bed26f3dc97d5e5cff437d075d7acff8";
};
data = fetchgit {
url = "https://github.com/celeron55/minetest_game.git";
rev = "3928eccf74af0288d12ffb14f8222fae479bc06b";
};
};
in stdenv.mkDerivation {
name = "minetest-${version}";
src = sources.src;
cmakeFlags = [
"-DIRRLICHT_INCLUDE_DIR=${irrlicht3843}/include/irrlicht"
];
buildInputs = [
cmake irrlicht3843 libpng12 bzip2 libjpeg
libXxf86vm mesa openal libvorbis x11
];
postInstall = ''
mkdir -pv $out/share/minetest/games/minetest_game/
cp -rv ${sources.data}/* $out/share/minetest/games/minetest_game/
'';
meta = {
homepage = "http://minetest.net/";
description = "Minetest is an infinite-world block sandbox game.";
license = "LGPLv2.1+";
};
}

View File

@@ -1,78 +1,96 @@
{ stdenv, fetchurl, unzip, zlib, libpng, bzip2, SDL, SDL_mixer } :
{ stdenv, fetchurl, unzip, zlib, libpng, bzip2, SDL, SDL_mixer, makeWrapper } :
let
# This is the default "pakset" of objects, images, text, music, etc.
result = withPak (mkPak pak128);
ver_1 = "112";
ver_2 = "1";
ver_h2 = "${ver_1}-${ver_2}";
# "pakset" of objects, images, text, music, etc.
mkPak = src: stdenv.mkDerivation {
name = "simutrans-pakset";
inherit src;
unpackPhase = "true";
buildInputs = [ unzip ];
installPhase = ''
mkdir -p $out
cd $out
unzip ${src}
mv simutrans/*/* .
rm -rf simutrans
'';
};
pak64 = fetchurl {
url = http://sourceforge.net/projects/simutrans/files/pak64/110-0-1/simupak64-110-0-1.zip/download;
name = "pak64.zip";
sha256 = "0gs6k9dbbhh60g2smsx2jza65vyss616bpngwpvilrvb5rzzrxcq";
url = "mirror://sourceforge/simutrans/pak64/${ver_h2}/simupak64-${ver_h2}.zip";
sha256 = "1197rl2534wx9wdafarlr42qjw6pyghz4bynq2g68pi10h8csypw";
};
pak128 = fetchurl {
url = "mirror://sourceforge/simutrans/pak128/pak128%20for%20${ver_1}/pak128-2.2.0--${ver_1}.0.zip";
sha256 = "13rwv9q3fa3ac0k11ds7zkpd00k4mn14rb0cknknvyz46icb9n80";
};
# The source distribution seems to be missing some text files.
# So we will get them from the binary Linux release (which apparently has them).
langtab = fetchurl {
url = http://sourceforge.net/projects/simutrans/files/simutrans/110-0-1/simulinux-110-0-1.zip/download;
name = "simulinux-110-0-1.zip";
sha256 = "15z13kazdzhfzwxry7a766xkkdzaidvscylzrjkx3nnbcq6461s4";
};
in
stdenv.mkDerivation rec {
pname = "simutrans";
version = "110.0.1";
name = "${pname}-${version}";
src = fetchurl {
url = "http://github.com/aburch/simutrans/tarball/v110.0.1";
name = "${name}.tar.gz";
sha256 = "ab0e42e5013d6d2fd5d3176b39dc45e482583b3bad178aac1188bf2ec88feb51";
withPak = pak: stdenv.mkDerivation {
inherit (binaries) name;
unpackPhase = "true";
buildInputs = [ makeWrapper ];
installPhase = ''makeWrapper "${binaries}/bin/simutrans" "$out/bin/simutrans" --add-flags -objects --add-flags "${pak}"'';
inherit (binaries) meta;
};
buildInputs = [ zlib libpng bzip2 SDL SDL_mixer unzip ];
binaries = stdenv.mkDerivation rec {
pname = "simutrans";
name = "${pname}-${ver_1}.${ver_2}";
prePatch = ''
# Use ~/.simutrans instead of ~/simutrans
sed -i 's@%s/simutrans@%s/.simutrans@' simsys_s.cc
'';
src = fetchurl {
url = "mirror://sourceforge/simutrans/simutrans/${ver_h2}/simutrans-src-${ver_h2}.zip";
sha256 = "1xrxpd5m2dc9bk8w21smfj28r41ji1qaihjwkwrifgz6rhg19l5c";
};
sourceRoot = ".";
preConfigure = ''
# Configuration as per the readme.txt
sed -i 's@#BACKEND = sdl@BACKEND = sdl@' config.template
sed -i 's@#COLOUR_DEPTH = 16@COLOUR_DEPTH = 16@' config.template
sed -i 's@#OSTYPE = linux@OSTYPE = linux@' config.template
sed -i 's@#OPTIMISE = 1@OPTIMISE = 1@' config.template
buildInputs = [ zlib libpng bzip2 SDL SDL_mixer unzip ];
cp config.template config.default
'';
preConfigure = ''
# Configuration as per the readme.txt
sed \
-e 's@#BACKEND = sdl@BACKEND = sdl@' \
-e 's@#COLOUR_DEPTH = 16@COLOUR_DEPTH = 16@' \
-e 's@#OSTYPE = linux@OSTYPE = linux@' \
< config.template > config.default
installPhase = ''
# Erase the source distribution object definitions, will be replaced with langtab.
rm -r simutrans
# Different default data dir
sed -i -e 's:argv\[0\]:"'$out'/share/simutrans/":' \
simmain.cc
# Default pakset and binary release core objects.
unzip ${pak64}
unzip ${langtab}
# Use ~/.simutrans instead of ~/simutrans ##not working
#sed -i -e 's@%s/simutrans@%s/.simutrans@' simsys_s.cc
mv sim simutrans/
mkdir -p $out/simutrans
cp -r simutrans $out
mkdir -p $out/bin
ln -s $out/simutrans/sim $out/bin/simutrans
'';
meta = {
description = "Simutrans is a simulation game in which the player strives to run a successful transport system.";
longDescription = ''
Simutrans is a cross-platform simulation game in which the
player strives to run a successful transport system by
transporting goods, passengers, and mail between
places. Simutrans is an open source remake of Transport Tycoon.
# No optimization overriding
sed -i -e '/-O$/d' Makefile
'';
homepage = http://www.simutrans.com/;
license = "Artistic";
maintainers = [ stdenv.lib.maintainers.kkallio ];
platforms = stdenv.lib.platforms.linux;
installPhase = ''
mkdir -p $out/share/
mv simutrans $out/share/
mkdir -p $out/bin/
mv build/default/sim $out/bin/simutrans
'';
meta = {
description = "A simulation game in which the player strives to run a successful transport system";
longDescription = ''
Simutrans is a cross-platform simulation game in which the
player strives to run a successful transport system by
transporting goods, passengers, and mail between
places. Simutrans is an open source remake of Transport Tycoon.
'';
homepage = http://www.simutrans.com/;
license = "Artistic";
maintainers = [ stdenv.lib.maintainers.kkallio ];
platforms = stdenv.lib.platforms.linux;
};
};
}
in result

View File

@@ -1,35 +0,0 @@
{ stdenv, fetchurl, arts, kdelibs, libX11, libXext, libXt, perl, qt3, zlib }:
let
versionNumber = "0.5.3";
in
stdenv.mkDerivation {
name = "six-${versionNumber}";
src = fetchurl {
url = "http://six.retes.hu/download/six-${versionNumber}.tar.gz";
sha256 = "0hialm0kxr11rp5z452whjmxp2vaqqj668d0dfs32fd10ggi8wj4";
};
meta = {
description = "Six - A Hex playing program for KDE";
homepage = http://six.retes.hu/;
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
};
buildInputs = [ arts kdelibs libX11 libXext libXt perl qt3 zlib ];
# Supress some warnings which are less useful to us when making packages.
NIX_CFLAGS_COMPILE = "-Wno-conversion -Wno-parentheses";
# Without "--x-libraries=", we get the error
# "impure path `/usr/lib' used in link".
configureFlags = "--x-libraries=";
patches = [ ./gcc43-includes.patch ];
}

View File

@@ -1,38 +0,0 @@
This patch makes six compile with gcc 4.3 by including more header files. It
is based on the advice at <http://gcc.gnu.org/gcc-4.3/porting_to.html>.
--- a/six/carrier.h
+++ b/six/carrier.h
@@ -2,6 +2,7 @@
#ifndef CARRIER_H
#define CARRIER_H
+#include <cstring>
#include <iostream>
#include <vector>
diff --git a/six/hexgame.cpp b/six/hexgame.cpp
index 720e977..5d0dafe 100644
--- a/six/hexgame.cpp
+++ b/six/hexgame.cpp
@@ -3,6 +3,7 @@
#include <cassert>
#include <cctype>
#include <cstdio>
+#include <cstdlib>
#include <string>
diff --git a/six/main.cpp b/six/main.cpp
index 7fb5c21..b925a0c 100644
--- a/six/main.cpp
+++ b/six/main.cpp
@@ -4,6 +4,8 @@
#include "carrier.h"
#include "misc.h"
+#include <cstdlib>
+
#include <kapp.h>
#include <dcopclient.h>
#include <kaboutdata.h>

View File

@@ -1,53 +1,35 @@
{stdenv, fetchurl, SDL, mesa, SDL_image, SDL_ttf, SDL_mixer, libpng, libjpeg, zlib
, curl, libvorbis, libtheora, xvidcore, pkgconfig, gtk, glib, libxml2, gtksourceview
, gtkglext, openal, gettext, p7zip }:
{ stdenv, fetchurl, libtheora, xvidcore, mesa, SDL, SDL_ttf, SDL_mixer
, curl, libjpeg, libpng, gettext, cunit, enableEditor?false }:
stdenv.mkDerivation rec {
name = "ufoai-2.3";
name = "ufoai-2.4";
src = fetchurl {
url = mirror://sourceforge/ufoai/ufoai-2.3-source.tar.bz2;
sha256 = "1pb41q5wx180l6xv8gm1sw8b7cji42znnb6qpjaap6vpgc8k3hp9";
url = "mirror://sourceforge/ufoai/${name}-source.tar.bz2";
sha256 = "0kxrbcjrharcwz319s90m789i4my9285ihp5ax6kfhgif2vn2ji5";
};
srcData = fetchurl {
url = mirror://sourceforge/ufoai/ufoai-2.3-data.tar;
sha256 = "0952kx6cbi4y89fbz1ig32rvsmfhzqpvdf79rq4axag9d3i5qlqf";
url = "mirror://sourceforge/ufoai/${name}-data.tar";
sha256 = "1drhh08cqqkwv1yz3z4ngkplr23pqqrdx6cp8c3isy320gy25cvb";
};
srcI18n = fetchurl {
url = mirror://sourceforge/ufoai/ufoai-2.3-i18n.tar.bz2;
sha256 = "14fzv8a4xng6kfl6aw8yzz6vl2j5vryxija5b2yz75jbfpa94i09";
};
preConfigure = ''tar xvf "${srcData}"'';
# for the xvidcore static lib
NIX_CFLAGS_COMPILE = "-pthread -lm";
configureFlags = [ "--enable-release" "--enable-sse" ]
++ stdenv.lib.optional enableEditor "--enable-uforadiant";
# Order is important, x libs include a libpng version that fails for ufoai
buildInputs = [ libpng SDL mesa SDL_image SDL_ttf SDL_mixer libjpeg zlib curl libvorbis
libtheora xvidcore pkgconfig glib gtk gtkglext gtksourceview libxml2 openal gettext
p7zip ];
buildInputs = [
libtheora xvidcore mesa SDL SDL_ttf SDL_mixer
curl libjpeg libpng gettext cunit
];
enableParallelBuilding = true;
preConfigure = ''
tar xvf $srcI18n
'';
configureFlags = "--enable-release";
postInstall = ''
pushd $out/share/ufoai
tar xvf $srcData
popd
'';
installTargets = "install_exec";
NIX_CFLAGS_LINK = "-lgcc_s"; # to avoid occasional runtime error in finding libgcc_s.so.1
meta = {
homepage = http://www.ultimatestunts.nl/;
description = "Squad-based tactical strategy game in the tradition of X-Com";
homepage = http://ufoai.org;
description = "A squad-based tactical strategy game in the tradition of X-Com";
license = "GPLv2+";
maintainers = with stdenv.lib.maintainers; [viric];
#platforms = stdenv.lib.platforms.linux;
platforms = with stdenv.lib.platforms; linux;
};
}

View File

@@ -0,0 +1,84 @@
{ stdenv, requireFile, SDL, pulseaudio, alsaLib }:
stdenv.mkDerivation rec {
name = "vessel-12082012";
goBuyItNow = ''
We cannot download the full version automatically, as you require a license.
Once you bought a license, you need to add your downloaded version to the nix store.
You can do this by using "nix-prefetch-url file://${name}-bin" in the
directory where you saved it.
'';
src = if (stdenv.isi686) then
requireFile {
message = goBuyItNow;
name = "${name}-bin";
sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96";
} else throw "unsupported platform ${stdenv.s:ystem} only i686-linux supported for now.";
phases = "installPhase";
ld_preload = ./isatty.c;
libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc stdenv.gcc.libc ]
+ ":" + stdenv.lib.makeLibraryPath [ SDL pulseaudio alsaLib ] ;
installPhase = ''
ensureDir $out/libexec/strangeloop/vessel/
ensureDir $out/bin
# allow scripting of the mojoinstaller
gcc -fPIC -shared -o isatty.so $ld_preload
echo @@@
echo @@@ this next step appears to hang for a while
echo @@@
# if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step.
LD_PRELOAD=./isatty.so $(cat $NIX_GCC/nix-support/dynamic-linker) $src << IM_A_BOT
n
$out/libexec/strangeloop/vessel/
IM_A_BOT
# use nix SDL libraries
rm $out/libexec/strangeloop/vessel/x86/libSDL*
rm $out/libexec/strangeloop/vessel/x86/libstdc++*
# props to Ethan Lee (the Vessel porter) for understanding
# how $ORIGIN works in rpath. There is hope for humanity.
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
$out/libexec/strangeloop/vessel/x86/vessel.x86
# we need to libs to find their deps
for lib in $out/libexec/strangeloop/vessel/x86/lib* ; do
patchelf \
--set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
$lib
done
cat > $out/bin/Vessel << EOW
#!/bin/sh
cd $out/libexec/strangeloop/vessel/
exec ./x86/vessel.x86
EOW
chmod +x $out/bin/Vessel
'';
meta = {
description = "A fluid physics based puzzle game";
longDescription = ''
Living liquid machines have overrun this world of unstoppable progress,
and it is the role of their inventor, Arkwright, to stop the chaos they are
causing. Vessel is a game about a man with the power to bring ordinary matter
to life, and all the consequences that ensue.
'';
homepage = http://www.strangeloopgames.com;
license = [ "unfree" ];
maintainers = with stdenv.lib.maintainers; [ jcumming ];
platforms = [ "i686-linux"] ;
};
}

View File

@@ -0,0 +1,6 @@
// We override isatty to help 'automate' installers.
// Some installers (mojoinstall) have a stdio GUI that refuses to run if you
// feed it a file on stdin. This should help that.
int isatty(int fd) { return 1; }

View File

@@ -1,16 +1,17 @@
{ stdenv, fetchurl, unzip, pkgconfig, zlib, curl, libjpeg, libpng, libvorbis
, libtheora, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal
, libtheora, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal, freetype
, makeWrapper
}:
stdenv.mkDerivation rec {
name = "warsow-${version}";
version = "1.02";
version = "1.03";
mversion = "1.02"; # sometimes only engine is updated
src1 = fetchurl {
url = "http://www.warsow.net:1337/~warsow/1.02/warsow_1.02_sdk.tar.gz";
sha256 = "0b5vra4qihkkcw4jn54r8l2lyl2mp67b4y1m76nyz7f34vng1hdy";
url = "http://www.warsow.net:1337/~warsow/${version}/warsow_${version}_sdk.tar.gz";
sha256 = "0z6r5v30p8fxbszmkxssv5fnnjw7w5wfn7wfgbwvmy87ayi7mkcq";
};
src2 = fetchurl {
url = "http://www.warsow.net:1337/~warsow/1.02/warsow_1.02.tar.gz";
url = "http://www.warsow.net:1337/~warsow/${mversion}/warsow_${mversion}.tar.gz";
sha256 = "0ai5v1h5g9nq21ixz23v0qsj9dr7dbiz7l8r34mq4c3z6ili8zpy";
};
unpackPhase = ''
@@ -25,18 +26,20 @@ stdenv.mkDerivation rec {
substituteInPlace snd_openal/snd_main.c --replace libopenal.so.1 ${openal}/lib/libopenal.so.1
'';
buildInputs = [ unzip pkgconfig zlib curl libjpeg libpng libvorbis libtheora
libXxf86dga libXxf86vm libXinerama SDL mesa openal ];
libXxf86dga libXxf86vm libXinerama SDL mesa openal makeWrapper
];
installPhase = ''
dest=$out/opt/warsow
cd release
for f in warsow wsw_server wswtv_server; do
substituteInPlace $f --replace BINARY_DIR= BINARY_DIR=$dest
done
mkdir -p $dest
mkdir -p $out/bin
cp -v {warsow,wsw_server,wswtv_server}.* $dest
cp -v {warsow,wsw_server,wswtv_server}* $dest
cp -rv basewsw libs $dest
cp -v warsow wsw_server wswtv_server $out/bin
# Since 1.03 some modules are _always_ downloaded from server, thus
makeWrapper $dest/warsow $out/bin/warsow \
--suffix-each LD_LIBRARY_PATH ':' "${freetype}/lib"
makeWrapper $dest/wsw_server $out/bin/wsw_server
makeWrapper $dest/wswtv_server $out/bin/wswtv_server
'';
postFixup = ''
p=$out/opt/warsow/warsow.*