Some review of builder-defs and dependent files. No rebuild needed. Now it should be possible to override elements in builderDefs

svn path=/nixpkgs/trunk/; revision=10214
This commit is contained in:
Michael Raskin 2008-01-18 12:36:56 +00:00
parent a5e0e39cdb
commit bc46eaf404
45 changed files with 165 additions and 111 deletions

View File

@ -1,5 +1,5 @@
args: with args;
with (builderDefs {
let localDefs = builderDefs {
src =
fetchurl {
url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz;
@ -8,7 +8,8 @@ args: with args;
buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk
gettext glib];
} null);
} null;
in with localDefs;
let
postInstall = FullDepEntry ("
old_rpath=$(patchelf --print-rpath \$out/bin/audacity);
@ -25,7 +26,7 @@ stdenv.mkDerivation {
name = "audacity-1.3.3";
builder = writeScript "audacity-1.3.3-builder"
(textClosure [addInputs (doDump "0") (noDepEntry "echo \$PATH; ar --version") doConfigure preBuild doMakeInstall postInstall doForceShare]);
(textClosure localDefs [addInputs (doDump "0") (noDepEntry "echo \$PATH; ar --version") doConfigure preBuild doMakeInstall postInstall doForceShare]);
meta = {
description = "

View File

@ -1,5 +1,5 @@
args: with args;
with (builderDefs {
let localDefs = builderDefs {
src =
fetchurl {
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
@ -8,6 +8,7 @@ args: with args;
buildInputs = [fftw ladspaH pkgconfig];
configureFlags = [];
} null);
in with localDefs;
let
postInstall = FullDepEntry ("
ensureDir \$out/share/ladspa/
@ -17,7 +18,7 @@ in
stdenv.mkDerivation {
name = "swh-plugins-0.4.15";
builder = writeScript "swh-plugins-0.4.15-builder"
(textClosure [doConfigure doMakeInstall
(textClosure localDefs [doConfigure doMakeInstall
postInstall doForceShare]);
meta = {
description = "

View File

@ -6,10 +6,11 @@ let
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
};
in
with builderDefs {
let localDefs = builderDefs {
buildInputs = [];
inherit src;
} null;
in with localDefs;
let
copyFile = FullDepEntry ("
ensureDir \$out/include
@ -19,7 +20,7 @@ in
stdenv.mkDerivation {
name = "ladspa.h";
builder = writeScript "ladspa.h-builder"
(textClosure [copyFile]);
(textClosure localDefs [copyFile]);
meta = {
description = "
LADSPA format audio plugins.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src =
fetchurl {
url = ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-9.4.tar.gz;
@ -20,6 +20,7 @@ args : with args;
++ (lib.optional (args ? sndlib) "--with-midi" )
;
} null; /* null is a terminator for sumArgs */
in with localDefs;
let preBuild = FullDepEntry ("
cp config.log /tmp/snd-config.log
") [minInit doUnpack];
@ -27,7 +28,7 @@ in
stdenv.mkDerivation rec {
name = "Snd-9.4";
builder = writeScript (name + "-builder")
(textClosure [doConfigure preBuild doMakeInstall doForceShare]);
(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare]);
meta = {
description = "
Snd sound editor.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://prdownloads.sourceforge.net/jocr/gocr-0.44.tar.gz;
@ -9,10 +9,11 @@ fetchurl {
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "gocr";
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
GPL Optical Character Recognition

View File

@ -1,4 +1,4 @@
args : with args; with builderDefs (args // {
args : with args; let localDefs = builderDefs (args // {
src = /* put a fetchurl here */
fetchurl {
url = http://www.jwz.org/xscreensaver/xscreensaver-5.04.tar.gz;
@ -20,6 +20,7 @@ args : with args; with builderDefs (args // {
" --with-hackdir=\$out/share/xscreensaver-hacks ")
];
}) null; /* null is a terminator for sumArgs */
in with localDefs;
let
preConfigure = FullDepEntry ("
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' "+
@ -29,7 +30,7 @@ in
stdenv.mkDerivation rec {
name = "xscreensaver-"+version;
builder = writeScript (name + "-builder")
(textClosure [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
The X screensaver daemon. Run xscreensaver-demo to configure.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz;
@ -9,6 +9,7 @@ args : with args;
buildInputs = [ SDL zlib which ];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
preConfigure = FullDepEntry ("
gcc --version
@ -17,7 +18,7 @@ in
stdenv.mkDerivation rec {
name = "qemu-"+version;
builder = writeScript (name + "-builder")
(textClosure [ preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [ preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
QEmu processor emulator.

View File

@ -1,6 +1,6 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2;
@ -9,6 +9,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doCopy = FullDepEntry ("
ensureDir \$out/share/qemu-images
@ -18,7 +19,7 @@ in
stdenv.mkDerivation rec {
name = "QEmu-Linux-Image-"+version;
builder = writeScript (name + "-builder")
(textClosure [doCopy doForceShare doPropagate]);
(textClosure localDefs [doCopy doForceShare doPropagate]);
meta = {
description = "
${abort "Write a description"}

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://www.virtualbox.org/download/1.5.2/VirtualBox-1.5.2_OSE.tar.bz2;
@ -9,10 +9,11 @@ args : with args;
wine jre libxslt libIDL SDL qt3 openssl zlib];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "VirtualBox-"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Virtual Box is just software for running virtual machines.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/compiz-bcop-0.6.0.tar.bz2;
@ -9,6 +9,7 @@ args : with args;
propagatedBuildInputs = [getopt libxslt];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
fixPkgconfig = FullDepEntry ("
ensureDir \$out/lib
@ -21,7 +22,7 @@ in
stdenv.mkDerivation rec {
name = "compiz-bcop-"+version;
builder = writeScript (name + "-builder")
(textClosure [doAutotools doConfigure doMakeInstall fixPkgconfig fixInterpreter doForceShare
(textClosure localDefs [doAutotools doConfigure doMakeInstall fixPkgconfig fixInterpreter doForceShare
doPropagate]);
inherit propagatedBuildInputs;
meta = {

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/ccsm-0.6.0.tar.bz2;
@ -15,10 +15,11 @@ args : with args;
"PYTHONPATH" "$(toPythonPath ${pygtk})/gtk-2.0"
];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "compizconfig-settings-"+args.version;
builder = writeScript (name + "-builder")
(textClosure [installPythonPackage (doWrap "\$out/bin/ccsm")]);
(textClosure localDefs [installPythonPackage (doWrap "\$out/bin/ccsm")]);
meta = {
description = "
Compiz Settings Manager

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/compiz-manager-0.6.0.tar.bz2;
@ -20,6 +20,7 @@ args : with args;
"XORG_DRIVER_PATH" "/nix/store/.*"
]];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
install = FullDepEntry ("
sed -e '/Checking for texture_from_pixmap:/areturn 0' -i compiz-manager
@ -34,7 +35,7 @@ in
stdenv.mkDerivation rec {
name = "compiz-manager-"+args.version;
builder = writeScript (name + "-builder")
(textClosure [doUnpack doReplaceScripts install doPropagate doForceShare]);
(textClosure localDefs [doUnpack doReplaceScripts install doPropagate doForceShare]);
meta = {
description = "
Compiz Launch Manager

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0.1/compizconfig-python-0.6.0.1.tar.bz2;
@ -9,10 +9,11 @@ args : with args;
[libcompizconfig bcop python pyrex configBackendGConf];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "compizconfig-python-"+args.version;
builder = writeScript (name + "-builder")
(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
(textClosure localDefs [doAutotools doConfigure doMakeInstall doForceShare]);
meta = {
description = "
Compiz configuration - Python part.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/compizconfig-backend-gconf-0.6.0.tar.bz2;
@ -10,10 +10,11 @@ args : with args;
configureFlags = [];
forceShare = ["man" "doc" "info" "lib/compizconfig"];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "compizconfig-backend-GConf-"+version;
builder = writeScript (name + "-builder")
(textClosure [doAutotools doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doAutotools doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Compiz configuration backend (GConf).

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-extra-0.6.0.tar.bz2;
@ -9,6 +9,7 @@ args : with args;
[bcop libjpeg gettext pluginsMain];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
sharePlugins = FullDepEntry ("
ensureDir \$out/share/compiz-plugins
@ -22,7 +23,7 @@ in
stdenv.mkDerivation rec {
name = "compiz-fusion-plugins-extra-"+version;
builder = writeScript (name + "-builder")
(textClosure [fixIncludes doConfigure doMakeInstall sharePlugins doForceShare]);
(textClosure localDefs [fixIncludes doConfigure doMakeInstall sharePlugins doForceShare]);
meta = {
description = "
Extra Compiz Fusion plugins.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/libcompizconfig-0.6.0.tar.bz2;
@ -9,10 +9,11 @@ args : with args;
[bcop];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "libcompizconfig-"+version;
builder = writeScript (name + "-builder")
(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
(textClosure localDefs [doAutotools doConfigure doMakeInstall doForceShare]);
meta = {
description = "
Compiz configuration backend library.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-main-0.6.0.tar.bz2;
@ -9,6 +9,7 @@ args : with args;
[bcop libjpeg gettext];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
sharePlugins = FullDepEntry ("
ensureDir \$out/share/compiz-plugins
@ -18,7 +19,7 @@ in
stdenv.mkDerivation rec {
name = "compiz-fusion-plugins-main-"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall sharePlugins doForceShare]);
(textClosure localDefs [doConfigure doMakeInstall sharePlugins doForceShare]);
meta = {
description = "
Main Compiz Fusion plugins.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/compiz/0.6.2/compiz-0.6.2.tar.bz2;
@ -22,6 +22,7 @@ args : with args;
(if args ? extraConfigureFlags then args.extraConfigureFlags else []);
patches = [ ./glx-patch-0.6.2.patch ];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
postAll = FullDepEntry ("
for i in $out/bin/*; do
@ -36,7 +37,7 @@ stdenv.mkDerivation
rec {
name = "compiz-0.6.2";
builder = writeScript (name + "-builder")
(textClosure [doPatch doConfigure doMakeInstall doPropagate
(textClosure localDefs [doPatch doConfigure doMakeInstall doPropagate
doForceShare postAll]);
inherit propagatedBuildInputs;
meta = {

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://garr.dl.sourceforge.net/sourceforge/fbpanel/fbpanel-4.12.tgz;
@ -10,10 +10,11 @@ args : with args;
libpng libjpeg libtiff librsvg];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "fbpanel";
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Just a desktop panel.

View File

@ -1,9 +1,10 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src =""; /* put a fetchurl here */
buildInputs = [mkfontdir mkfontscale];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doInstall = FullDepEntry ("
ensureDir \$out/share/fonts/
@ -18,10 +19,10 @@ in
stdenv.mkDerivation rec {
name = "wrapped-font-dir";
builder = writeScript (name + "-builder")
(textClosure [ doInstall doForceShare doPropagate]);
(textClosure localDefs [ doInstall doForceShare doPropagate]);
meta = {
description = "
Just a wrapper to create fots.dir and fonts.scale .
Just a wrapper to create fonts.dir and fonts.scale .
";
};
}

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://www.lambdassociates.org/Download/Qi9.1.zip;
@ -8,6 +8,7 @@ args : with args;
buildInputs = [ unzip clisp];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
shell=stdenv.shell;
in
@ -28,7 +29,7 @@ in
stdenv.mkDerivation rec {
name = "Qi-"+version;
builder = writeScript (name + "-builder")
(textClosure [allBuild doForceShare doPropagate]);
(textClosure localDefs [allBuild doForceShare doPropagate]);
meta = {
description = "
Qi - next generation on top of Common Lisp.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.6.tar.gz;
@ -8,10 +8,11 @@ args : with args;
buildInputs = [python];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "Pyrex-"+version;
builder = writeScript (name + "-builder")
(textClosure [installPythonPackage doForceShare]);
(textClosure localDefs [installPythonPackage doForceShare]);
meta = {
description = "
Python package compiler or something like that.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src =
fetchurl {
url = ftp://ftp.fftw.org/pub/fftw/fftw-3.1.2.tar.gz;
@ -8,10 +8,11 @@ args : with args;
buildInputs = [];
configureFlags = ["--enable-float --enable-shared"];
} null;
in with localDefs;
stdenv.mkDerivation {
name = "fftw-3.1.2";
builder = writeScript "fftw-3.1.2-builder"
(textClosure [doConfigure doMakeInstall doForceShare]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare]);
meta = {
description = "
Fastest Fourier Transform in the West library.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libdbi-drivers/libdbi-drivers-0.8.2-1.tar.gz;
@ -27,10 +27,11 @@ args : with args;
] else [])
;
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "libdbi"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
DB independent interface to DB; DB drivers (mysql only for now).

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libdbi/libdbi-0.8.2.tar.gz;
@ -9,10 +9,11 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "libdbi"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
DB independent interface to DB.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://gnunet.org/libextractor/download/libextractor-0.5.18.tar.gz;
@ -9,10 +9,11 @@ args : with args;
buildInputs = [ zlib];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "libextractor"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Libextractor - extracts metadata from files.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.gnu.org/gnu/indent/indent-2.2.9.tar.gz;
@ -9,6 +9,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
preBuild = FullDepEntry ("
sed -e '/extern FILE [*]output/i#ifndef OUTPUT_DEFINED_ELSEWHERE' -i src/indent.h
@ -19,7 +20,7 @@ in
stdenv.mkDerivation rec {
name = "indent";
builder = writeScript (name + "-builder")
(textClosure [doConfigure preBuild doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare doPropagate]);
meta = {
description = "
GNU Indent - a source text formatter.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://ftp.gnome.org/pub/gnome/sources/intltool/0.36/intltool-0.36.2.tar.bz2;
@ -9,10 +9,11 @@ args : with args;
propagatedBuildInputs = [perl perlXMLParser];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "intltool-0.36.2";
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doPropagate doForceShare]);
(textClosure localDefs [doConfigure doMakeInstall doPropagate doForceShare]);
inherit propagatedBuildInputs;
meta = {
description = "

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz;
@ -12,6 +12,7 @@ args : with args;
cd ltrace-*;
";
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
preConfigure = FullDepEntry ("
sed -e 's@-o root -g root@@' -i Makefile.in;
@ -20,7 +21,7 @@ in
stdenv.mkDerivation rec {
name = "ltrace-0.5";
builder = writeScript (name + "-builder")
(textClosure [preConfigure doConfigure doMakeInstall doForceShare]);
(textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare]);
meta = {
description = "
Library call tracer.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://savannah.nongnu.org/download/construo/construo-0.2.2.tar.gz;
@ -11,6 +11,7 @@ args : with args;
;
configureFlags = [""];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
preConfigure = FullDepEntry ("
sed -e 's/math[.]h/cmath/' -i vector.cxx
@ -20,7 +21,7 @@ in
stdenv.mkDerivation rec {
name = "construo-"+version;
builder = writeScript (name + "-builder")
(textClosure [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Construo masses and springs simulation.

View File

@ -1,13 +1,13 @@
args: with args;
with (builderDefs
{
let localDefs = builderDefs {
buildInputs =[(wxGTK null)];
src =
fetchurl {
url = http://www.piettes.com/fallingsandgame/fsg-src-4.4.tar.gz;
sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c";
};
} null);
} null;
in with localDefs;
let
preBuild = FullDepEntry "
sed -e '
@ -25,7 +25,7 @@ in
stdenv.mkDerivation {
name = "fsg-4.4";
builder = writeScript "fsg-4.4-builder"
(textClosure [doUnpack addInputs preBuild doMake installPhase doForceShare]);
(textClosure localDefs [doUnpack addInputs preBuild doMake installPhase doForceShare]);
meta = {
description = "

View File

@ -18,7 +18,7 @@ args:
with lib;
let
inherit (builtins)
head tail isList;
head tail isList isAttrs;
in
rec {
@ -52,12 +52,23 @@ rec {
(concatLists (map textClosureDupList arg.deps)) ++ [arg]
);
textClosureList = arg:
textClosureDupListOverridable = predefined: arg:
(
if isList arg then
textClosureDupListOverridable predefined {text = ""; deps = arg;}
else if isAttrs arg then
(concatLists (map (textClosureDupListOverridable predefined) arg.deps)) ++ [arg]
else
textClosureDupListOverridable predefined (getAttr [arg] [] predefined)
);
textClosureListOverridable = predefined: arg:
(map (x : x.text)
(uniqList {inputList = textClosureDupList arg;}));
textClosure = arg: concatStringsSep "\n" (textClosureList arg);
(uniqList {inputList = textClosureDupListOverridable predefined arg;}));
textClosureOverridable = predefined: arg: concatStringsSep "\n" (textClosureListOverridable predefined arg);
textClosureMap = f: arg: concatStringsSep "\n" (map f (textClosureList arg));
textClosureMapOveridable = f: predefined: arg:
concatStringsSep "\n" (map f (textClosureListOverridable predefined arg));
noDepEntry = text : {inherit text;deps = [];};
FullDepEntry = text : deps: {inherit text deps;};

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://downloads.sourceforge.net/madwifi/madwifi-0.9.3.3.tar.bz2;
@ -16,6 +16,7 @@ args : with args;
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
} else "")*/;
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doPatch = FullDepEntry (if patchAR2425x86 !="" then ''
cd hal
@ -25,7 +26,7 @@ in
stdenv.mkDerivation rec {
name = "atheros-"+version;
builder = writeScript (name + "-builder")
(textClosure [doPatch doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doPatch doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Atheros WiFi driver.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2756-20071018.tar.gz;
@ -16,6 +16,7 @@ args : with args;
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
} else "");
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doPatch = FullDepEntry (if patchAR2425x86 !="" then ''
cd hal
@ -26,7 +27,7 @@ in
stdenv.mkDerivation rec {
name = "atheros-"+version;
builder = writeScript (name + "-builder")
(textClosure [doPatch doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doPatch doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Atheros WiFi driver.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r3122-20080109.tar.gz;
@ -10,10 +10,11 @@ args : with args;
configureFlags = [];
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "atheros-"+version;
builder = writeScript (name + "-builder")
(textClosure [doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Atheros WiFi driver.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://download.savannah.gnu.org/releases/dmidecode/dmidecode-2.9.tar.bz2;
@ -10,10 +10,11 @@ args : with args;
configureFlags = [];
makeFlags = "prefix=\$out";
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "dmidecode-"+version;
builder = writeScript (name + "-builder")
(textClosure [ doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [ doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Tool to decode Desktop Management Interface and SBIOS data.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.0.tar.gz;
@ -10,6 +10,7 @@ args : with args;
configureFlags = [];
makeFlags = [" prefix=\$out "];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
preBuild = FullDepEntry ("
sed -e 's@/usr/local@'\$out'@g' -i Makefile.m4 Makefile
@ -18,7 +19,7 @@ in
stdenv.mkDerivation rec {
name = "dvd+rw-tools-"+version;
builder = writeScript (name + "-builder")
(textClosure [preBuild doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [preBuild doMakeInstall doForceShare doPropagate]);
meta = {
description = "
DVD+RW tools.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz;
@ -8,6 +8,7 @@ args : with args;
buildInputs = [];
configureFlags = [''--prefix=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
debugStep = FullDepEntry (''
cat config-host.mak
@ -21,7 +22,7 @@ in
stdenv.mkDerivation rec {
name = "kqemu-"+version;
builder = writeScript (name + "-builder")
(textClosure [preConfigure doConfigure debugStep doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [preConfigure doConfigure debugStep doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Kernel module for Qemu acceleration

View File

@ -1,10 +1,11 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
addSbinPath = true;
src = "";
buildInputs = [module_init_tools];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doCollect = FullDepEntry (''
@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
name = "kernel-modules";
inherit moduleSources;
builder = writeScript (name + "-builder")
(textClosure [doCollect doForceShare doPropagate]);
(textClosure localDefs [doCollect doForceShare doPropagate]);
meta = {
description = "
A directory to hold all the modules, including those

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://sg.torque.net/sg/p/sdparm-1.02.tgz;
@ -9,10 +9,11 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "sdparm-"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
SCSI parameters utility.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchcvs {
url = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
@ -12,6 +12,7 @@ args : with args;
e2fsprogs gnomevfs pkgconfig GConf];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let build = FullDepEntry ("
cd deps
sed -e 's/^CPP/#&/ ; s/^# CPP=gcc/CPP=gcc/' -i Makefile.camlidl
@ -41,7 +42,7 @@ in
stdenv.mkDerivation rec {
name = "relfs-"+version;
builder = writeScript (name + "-builder")
(textClosure [build doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [build doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Relational FS over FUSE.

View File

@ -1,5 +1,5 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://dfn.dl.sourceforge.net/sourceforge/gdmap/gdmap-0.7.5.tar.gz;
@ -9,10 +9,11 @@ args : with args;
buildInputs = [gtk pkgconfig libxml2 intltool];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "gdmap"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Recursive rectangle map of disk usage.

View File

@ -40,7 +40,7 @@ args: with args; with stringsWithDeps; with lib;
{
addToSearchPathWithCustomDelimiter \"\${PATH_DELIMITER}\" \"\$@\"
}
") [defNest];
") ["defNest"];
defNest = noDepEntry ("
nestingLevel=0
@ -95,7 +95,7 @@ args: with args; with stringsWithDeps; with lib;
prefix=${if args ? prefix then (toString args.prefix) else "\$out"}
"
else "")) [defNest defAddToSearchPath];
else "")) ["defNest" "defAddToSearchPath"];
addInputs = FullDepEntry ("
# Recursively find all build inputs.
@ -161,7 +161,7 @@ args: with args; with stringsWithDeps; with lib;
fi
PATH=\$_PATH\${_PATH:+:}\$PATH
") [minInit];
") ["minInit"];
defEnsureDir = FullDepEntry ("
# Ensure that the given directories exists.
@ -171,7 +171,7 @@ args: with args; with stringsWithDeps; with lib;
if ! test -x \"\$dir\"; then mkdir -p \"\$dir\"; fi
done
}
") [minInit];
") ["minInit"];
toSrcDir = s : FullDepEntry ((if (archiveType s) == "tar" then "
tar xvf '${s}'
@ -200,11 +200,11 @@ args: with args; with stringsWithDeps; with lib;
cd \$(basename ${s} .bz2)
" else (abort "unknown archive type : ${s}"))+
(if args ? goSrcDir then args.goSrcDir else "")
) [minInit];
) ["minInit"];
doConfigure = FullDepEntry ("
./configure --prefix=\"\$prefix\" ${toString configureFlags}
") [minInit addInputs doUnpack];
") ["minInit" "addInputs" "doUnpack"];
doAutotools = FullDepEntry ("
mkdir -p config
@ -214,21 +214,21 @@ args: with args; with stringsWithDeps; with lib;
autoheader || true;
automake --add-missing --copy
autoconf
")[minInit addInputs doUnpack];
")["minInit" "addInputs" "doUnpack"];
doMake = FullDepEntry ("
make ${toString makeFlags}
") [minInit addInputs doUnpack];
") ["minInit" "addInputs" "doUnpack"];
doUnpack = toSrcDir (toString src);
installPythonPackage = FullDepEntry ("
python setup.py install --prefix=\"\$prefix\"
") [minInit addInputs doUnpack];
") ["minInit" "addInputs" "doUnpack"];
doMakeInstall = FullDepEntry ("
make ${toString (getAttr ["makeFlags"] "" args)} "+
"${toString (getAttr ["installFlags"] "" args)} install") [doMake];
"${toString (getAttr ["installFlags"] "" args)} install") ["doMake"];
doForceShare = FullDepEntry ("
ensureDir \"\$prefix/share\"
@ -238,7 +238,7 @@ args: with args; with stringsWithDeps; with lib;
ln -sv share/\$d \"\$prefix\"
fi;
done;
") [minInit defEnsureDir];
") ["minInit" "defEnsureDir"];
doDump = n: noDepEntry "echo Dump number ${n}; set";
@ -250,7 +250,7 @@ args: with args; with stringsWithDeps; with lib;
doPatch = FullDepEntry (concatStringsSep ";"
(map toPatchCommand patches)
) [minInit doUnpack];
) ["minInit" "doUnpack"];
envAdderInner = s: x: if x==null then s else y:
a: envAdderInner (s+"echo export ${x}='\"'\"\$${x}:${y}\";'\"'\n") a;
@ -268,12 +268,12 @@ args: with args; with stringsWithDeps; with lib;
(${envAdderList env}
echo '\"'\"${cmd}-orig\"'\"' '\"'\\\$@'\"' \n) > \"${cmd}\"";
doWrap = cmd: FullDepEntry (wrapEnv cmd (getAttr ["wrappedEnv"] [] args)) [minInit];
doWrap = cmd: FullDepEntry (wrapEnv cmd (getAttr ["wrappedEnv"] [] args)) ["minInit"];
doPropagate = FullDepEntry ("
ensureDir \$out/nix-support
echo '${toString (getAttr ["propagatedBuildInputs"] [] args)}' >\$out/nix-support/propagated-build-inputs
") [minInit defEnsureDir];
") ["minInit" "defEnsureDir"];
/*debug = x:(__trace x x);
debugX = x:(__trace (__toXML x) x);*/
@ -283,7 +283,7 @@ args: with args; with stringsWithDeps; with lib;
replaceScripts = l:(concatStringsSep "\n" (pairMap replaceInScript l));
doReplaceScripts = FullDepEntry (replaceScripts (getAttr ["shellReplacements"] [] args)) [minInit];
makeNest = x:(if x==defNest.text then x else "startNest\n" + x + "\nstopNest\n");
textClosure = textClosureMap makeNest;
textClosure = textClosureMapOveridable makeNest;
inherit noDepEntry FullDepEntry PackEntry;

View File

@ -1,4 +1,4 @@
args : with args; with builderDefs (args // {
args : with args; let localDefs = builderDefs (args // {
src = /* put a fetchurl here */
(abort "Specify source");
useConfig = true;
@ -10,10 +10,11 @@ args : with args; with builderDefs (args // {
configFlags = [
];
}) null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "${(abort "Specify name")}"+version;
builder = writeScript (name + "-builder")
(textClosure [(abort "Check phases") doMakeInstall doForceShare doPropagate]);
(textClosure localDefs [(abort "Check phases") doMakeInstall doForceShare doPropagate]);
meta = {
description = "
${(abort "Specify description")}

View File

@ -1,14 +1,16 @@
args : with args;
with builderDefs {
let localDefs = builderDefs {
src = /* put a fetchurl here */
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "${abort "Specify name"}";
name = "${abort "Specify name"}-"+version;
builder = writeScript (name + "-builder")
(textClosure [(abort "Specify phases - defined here or in builderDefs") doForceShare doPropagate]);
(textClosure localDefs
[(abort "Specify phases - defined here or in builderDefs") doForceShare doPropagate]);
meta = {
description = "
${abort "Write a description"}