From 8a00dfcc189198b7e2f64725e74b77c117a04d16 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 13 Apr 2011 05:47:51 +0000 Subject: [PATCH] Update teeworlds svn path=/nixpkgs/trunk/; revision=26814 --- .../tools/build-managers/bam/default.nix | 63 +++++++++++++++++++ pkgs/games/teeworlds/default.nix | 25 ++------ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 70 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/tools/build-managers/bam/default.nix diff --git a/pkgs/development/tools/build-managers/bam/default.nix b/pkgs/development/tools/build-managers/bam/default.nix new file mode 100644 index 000000000000..ef5aed1f26ed --- /dev/null +++ b/pkgs/development/tools/build-managers/bam/default.nix @@ -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 + diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index 1185b663a02f..35b20fff98d5 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -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 = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ad45f1ecbe4..434593ff2f2f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };