Update teeworlds

svn path=/nixpkgs/trunk/; revision=26814
This commit is contained in:
Michael Raskin 2011-04-13 05:47:51 +00:00
parent 13a1c3a69b
commit 8a00dfcc18
3 changed files with 70 additions and 20 deletions

View File

@ -0,0 +1,63 @@
x@{builderDefsPackage
, lua5, python
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x)
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
baseName="bam";
version="0.4.0";
name="${baseName}-${version}";
url="http://github.com/downloads/matricks/bam/${name}.tar.bz2";
hash="0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
};
inherit (sourceInfo) name version;
inherit buildInputs;
/* doConfigure should be removed if not needed */
phaseNames = ["check" "doDeploy"];
build = a.fullDepEntry ''
sh make_unix.sh
'' ["minInit" "doUnpack" "addInputs"];
check = a.fullDepEntry ''
python scripts/test.py
'' ["build" "addInputs"];
doDeploy = a.fullDepEntry ''
ensureDir "$out/share/bam"
cp -r docs examples tests "$out/share/bam"
ensureDir "$out/bin"
cp bam "$out/bin"
'' ["minInit" "defEnsureDir" "build"];
meta = {
description = "Yet another build manager";
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
linux;
license = "free-noncopyleft";
};
passthru = {
updateInfo = {
downloadPage = "http://matricks.github.com/bam/";
};
};
}) x

View File

@ -1,34 +1,19 @@
{ fetchurl, stdenv, python, alsaLib, libX11, mesa, SDL }:
{ fetchurl, stdenv, python, alsaLib, libX11, mesa, SDL, lua5, zlib, bam }:
stdenv.mkDerivation rec {
name = "teeworlds-0.5.2";
name = "teeworlds-0.6.0";
src = fetchurl {
url = "http://www.teeworlds.com/files/${name}-src.tar.gz";
sha256 = "1h7likcqbyr3q8djzlgxmr8fiwwj8is3b01hd5x0qix1z4dsf48q";
sha256 = "7540ecf10624b7e4e530c44402dc2d162ff40a3fe10bf30e0bb542d3d0a6a721";
};
# Note: Teeworlds requires Python 2.x to compile. Python 3.0 will
# not work.
buildInputs = [ python alsaLib libX11 mesa SDL ];
buildInputs = [ python alsaLib libX11 mesa SDL lua5 zlib bam ];
patchPhase = ''
substituteInPlace "default.bam" \
--replace 'settings.linker.flags = ""' \
'settings.linker.flags = "-fstack-protector-all"'
'';
configurePhase = ''
# Fetch and build BAM, the home-made build system.
# FIXME: Move BAM outside of here. See http://www.teeworlds.com/trac/bam .
tar xzvf ${fetchurl {
url = "http://teeworlds.com/trac/bam/browser/releases/bam-0.2.0.tar.gz?format=raw";
sha256 = "0n077iiidw7xsyna4y92pz5dwqaywps3w0v5c88dic27vz0xsv7g";
}
}
( cd bam-* && ./make_unix.sh )
# Build Teeworlds.
./bam-*/src/bam release
bam release
'';
installPhase = ''

View File

@ -2536,6 +2536,8 @@ let
avrdude = callPackage ../development/tools/misc/avrdude { };
bam = callPackage ../development/tools/build-managers/bam {};
binutils = callPackage ../development/tools/misc/binutils {
inherit noSysDirs;
};