mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
7f5b839524
`selectVersion ./foo "bar"' instead of `import ./foo/bar.nix'. * Replaced `with args' with formal function arguments in several packages. * Renamed several files to `default.nix'. As a general rule, version numbers should only be included in the filename when there is a reason to keep multiple versions of a package in Nixpkgs. Otherwise, it just makes it harder to update the package. svn path=/nixpkgs/trunk/; revision=18403
43 lines
1.4 KiB
Nix
43 lines
1.4 KiB
Nix
args : with args; with builderDefs;
|
|
let localDefs = builderDefs.passthru.function (rec {
|
|
src = /* put a fetchurl here */
|
|
fetchurl {
|
|
sha256 = "1kx69f9jqnfzwjh47cl1df8p8hn3bnp6bznxnb6c4wx32ijn5gri";
|
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01.orig.tar.gz;
|
|
};
|
|
|
|
buildInputs = [mesa libXi libXt libXext libX11 libXmu freeglut esound];
|
|
configureFlags = [];
|
|
debianPatch =
|
|
fetchurl {
|
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01-9.diff.gz;
|
|
sha256 = "1v3s97day6fhv08l2rn81waiprhi1lfyjjsj55axfh6n6zqfn1w2";
|
|
};
|
|
customBuild = fullDepEntry (''
|
|
gunzip < ${debianPatch} | patch -Np1
|
|
cd src
|
|
sed -e 's@/usr/share/games/orbit/@'$out'/dump/@g' -i *.c
|
|
sed -e '/DIR=/d' -i Makefile
|
|
make
|
|
ensureDir $out/bin
|
|
cp -r .. $out/dump
|
|
cat >$out/bin/space-orbit <<EOF
|
|
#! /bin/sh
|
|
$out/dump/orbit "\$@"
|
|
EOF
|
|
chmod a+x $out/bin/space-orbit
|
|
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
|
|
});
|
|
in with localDefs;
|
|
stdenv.mkDerivation rec {
|
|
name = "space-orbit-1.01";
|
|
builder = writeScript (name + "-builder")
|
|
(textClosure localDefs
|
|
[ customBuild doForceShare doPropagate]);
|
|
meta = {
|
|
description = "Orbit space flight simulator";
|
|
inherit src;
|
|
};
|
|
}
|
|
|