diff --git a/pkgs/games/construo/0.2.2.nix b/pkgs/games/construo/0.2.2.nix new file mode 100644 index 000000000000..964b0e3898e6 --- /dev/null +++ b/pkgs/games/construo/0.2.2.nix @@ -0,0 +1,29 @@ +args : with args; + with builderDefs { + src = /* put a fetchurl here */ + fetchurl { + url = http://savannah.nongnu.org/download/construo/construo-0.2.2.tar.gz; + sha256 = "0c661rjasax4ykw77dgqj39jhb4qi48m0bhhdy42vd5a4rfdrcck"; + }; + + buildInputs = [libX11 zlib xproto] + ++ (if args ? mesa then [mesa freeglut] else []) + ; + configureFlags = [""]; + } null; /* null is a terminator for sumArgs */ +let +preConfigure = FullDepEntry (" + sed -e 's/math[.]h/cmath/' -i vector.cxx + sed -e 's/games/bin/' -i Makefile.in +") [doUnpack minInit]; +in +stdenv.mkDerivation rec { + name = "construo-"+version; + builder = writeScript (name + "-builder") + (textClosure [preConfigure doConfigure doMakeInstall doForceShare doPropagate]); + meta = { + description = " + Construo masses and springs simulation. +"; + }; +} diff --git a/pkgs/os-specific/linux/upstart/jobcontrol.nix b/pkgs/os-specific/linux/upstart/jobcontrol.nix new file mode 100644 index 000000000000..5be0276ffd52 --- /dev/null +++ b/pkgs/os-specific/linux/upstart/jobcontrol.nix @@ -0,0 +1,15 @@ +args: with args; +stdenv.mkDerivation { + name = "upstart-jobcontrol"; + buildCommand = " + mkdir -p \$out/bin + echo ' + file=/etc/event.d/\$1 + shift + controlscript=\$(egrep exec\\|respawn \$file | tail | sed -e s/^\\\\s\\\\+//g | sed -e s/\\\\s\\\\+/\\ /g | cut -f 2 -d \\ ) + echo Running \$controlscript \"\$@\" + \$controlscript \"\$@\" + ' >\$out/bin/jobcontrol + chmod a+x \$out/bin/jobcontrol + "; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fcdda93b8736..0835927bfcd5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3466,6 +3466,10 @@ rec { inherit fetchurl stdenv; }; + upstartJobControl = import ../os-specific/linux/upstart/jobcontrol.nix { + inherit stdenv; + }; + usbutils = import ../os-specific/linux/usbutils { inherit fetchurl stdenv libusb; }; @@ -4471,6 +4475,16 @@ rec { ### GAMES + construoFun = lib.sumArgs (selectVersion ../games/construo) { + inherit stdenv fetchurl builderDefs + zlib; + inherit (xlibs) libX11 xproto; + }; + + construo = construoFun { + inherit mesa freeglut; + version = "0.2.2"; + } null; exult = import ../games/exult { inherit fetchurl SDL SDL_mixer zlib libpng unzip;