Changed builderDefs to use composedArgsAndFun, reduced number of nulls, made overrides in builderDefsPackage to work in an intuitive manner.

svn path=/nixpkgs/trunk/; revision=12655
This commit is contained in:
Michael Raskin 2008-08-19 05:54:09 +00:00
parent b5b68ce414
commit 87ff8d6347
51 changed files with 224 additions and 181 deletions

View file

@ -1,5 +1,5 @@
args: with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src =
fetchurl {
url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz;
@ -8,7 +8,7 @@ args: with args;
buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk
gettext glib];
} null;
};
in with localDefs;
let
postInstall = FullDepEntry ("

View file

@ -1,5 +1,5 @@
args: with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src =
fetchurl {
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
@ -7,7 +7,7 @@ args: with args;
};
buildInputs = [fftw ladspaH pkgconfig];
configureFlags = [];
} null;
};
in with localDefs;
let
postInstall = FullDepEntry ("

View file

@ -6,10 +6,10 @@ let
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
};
in
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
buildInputs = [];
inherit src;
} null;
};
in with localDefs;
let
copyFile = FullDepEntry ("

View file

@ -1,51 +1,60 @@
args : with args;
let localDefs = builderDefs {
src =
fetchurl {
url = http://downloads.sourceforge.net/snd/snd-9.4.tar.gz;
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
};
args :
let
lib = args.lib;
fetchurl = args.fetchurl;
FullDepEntry = args.FullDepEntry;
buildInputs = [gtk glib pkgconfig libXpm gmp gettext libX11 fftw]
++ (lib.optional (args ? ruby) args.ruby)
++ (lib.optional (args ? mesa) args.mesa)
++ (lib.optional (args ? guile) args.guile)
++ (lib.optional (args ? libtool) args.libtool)
++ (lib.optional (args ? sndlib) args.sndlib)
++ (lib.optional (args ? alsaLib) args.alsaLib)
++ (lib.optional (args ? jackaudio) args.jackaudio)
;
configureFlags = ["--with-gtk" "--with-xpm"]
++ (lib.optional (args ? ruby) "--with-ruby" )
++ (lib.optional (args ? mesa) "--with-gl" )
++ (lib.optional (args ? guile) "--with-guile")
++ (lib.optional (args ? sndlib) "--with-midi" )
++ (lib.optional (args ? alsaLib) "--with-alsa")
++ (lib.optional (args ? jackaudio) "--with-jack" )
++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
;
} null; /* null is a terminator for sumArgs */
in with localDefs;
let makeDocsWork = FullDepEntry ''
version = lib.getAttr ["version"] "9.4" args;
buildInputs = with args; [gtk glib pkgconfig
libXpm gmp gettext libX11 fftw]
++ (lib.optional (args ? ruby) args.ruby)
++ (lib.optional (args ? mesa) args.mesa)
++ (lib.optional (args ? guile) args.guile)
++ (lib.optional (args ? libtool) args.libtool)
++ (lib.optional (args ? sndlib) args.sndlib)
++ (lib.optional (args ? alsaLib) args.alsaLib)
++ (lib.optional (args ? jackaudio) args.jackaudio)
;
configureFlags = ["--with-gtk" "--with-xpm"]
++ (lib.optional (args ? ruby) "--with-ruby" )
++ (lib.optional (args ? mesa) "--with-gl" )
++ (lib.optional (args ? guile) "--with-guile")
++ (lib.optional (args ? sndlib) "--with-midi" )
++ (lib.optional (args ? alsaLib) "--with-alsa")
++ (lib.optional (args ? jackaudio) "--with-jack" )
++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
;
in
rec {
src = fetchurl {
url = "http://downloads.sourceforge.net/snd/snd-${version}.tar.gz";
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be specified separately */
phaseNames = ["doConfigure" "preBuild" "makeDocsWork"
"doMakeInstall" "doForceShare"];
makeDocsWork = FullDepEntry ''
# hackish way to make html docs work
h="$out/share/snd/html"; ensureDir "$h"; cp *.html "$h"
patch -p1 < ${./doc.patch}
sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
'' [defEnsureDir];
'' ["defEnsureDir"];
preBuild = FullDepEntry (''
preBuild = FullDepEntry (''
cp config.log /tmp/snd-config.log
export NIX_LDFLAGS="$NIX_LDFLAGS -L${libX11}/lib -lX11"
export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
'') [minInit doUnpack makeDocsWork];
in
stdenv.mkDerivation rec {
name = "Snd-9.4";
builder = writeScript (name + "-builder")
(textClosure localDefs [doConfigure preBuild makeDocsWork doMakeInstall doForceShare ]);
meta = {
description = "Snd sound editor.";
homepage = http://ccrma.stanford.edu/software/snd;
inherit src;
};
'') ["minInit" "doUnpack" "makeDocsWork"];
name = "Snd-" + version;
meta = {
description = "Snd sound editor.";
homepage = http://ccrma.stanford.edu/software/snd;
inherit src;
};
}

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://prdownloads.sourceforge.net/jocr/gocr-0.44.tar.gz;
@ -8,7 +8,7 @@ fetchurl {
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "gocr";

View file

@ -1,4 +1,4 @@
args : with args; let localDefs = builderDefs (args // {
args : with args; let localDefs = builderDefs.meta.function (args // {
src = /* put a fetchurl here */
fetchurl {
url = http://www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz;
@ -19,7 +19,7 @@ args : with args; let localDefs = builderDefs (args // {
"true" (" --with-x-app-defaults=\$out/share/xscreensaver/app-defaults "+
" --with-hackdir=\$out/share/xscreensaver-hacks ")
];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
let
preConfigure = FullDepEntry ("

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function ((rec {
src = /* put a fetchurl here */
fetchurl {
url = http://download2.berlios.de/linuxdcpp/linuxdcpp-1.0.1.tar.bz2;
@ -15,7 +15,7 @@ args : with args; with builderDefs {src="";} null;
scons PREFIX=$out
scons PREFIX=$out install
'') ["minInit" "doUnpack" "addInputs" "defEnsureDir"];
}) args null; /* null is a terminator for sumArgs */
}) // args);
in with localDefs;
stdenv.mkDerivation rec {
name = "ldcpp-"+version;

View file

@ -1,6 +1,6 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = [ http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2 http://bellard.org/qemu/linux-0.2.img.bz2];
@ -8,7 +8,7 @@ args : with args;
};
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
doCopy = FullDepEntry ("

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/compiz/0.6.2/compiz-0.6.2.tar.bz2;
@ -21,7 +21,7 @@ args : with args;
"--enable-annotate" "--enable-librsvg"] ++
(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 ("

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://releases.compiz-fusion.org/0.7.4/compiz/compiz-0.7.4.tar.bz2;
@ -22,7 +22,7 @@ args : with args;
"--enable-annotate" "--enable-librsvg"] ++
(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 ("

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://garr.dl.sourceforge.net/sourceforge/fbpanel/fbpanel-4.12.tgz;
@ -9,7 +9,7 @@ args : with args;
buildInputs = [libX11 gtk pkgconfig libXmu libXpm
libpng libjpeg libtiff librsvg];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
}; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "fbpanel";

View file

@ -1,10 +1,10 @@
args : with args;
let
localDefs = with (builderDefs {src="";} null);
localDefs = with (builderDefs.meta.function {src="";});
let
checkFlag = flag : lib.getAttr [flag] false args;
in
builderDefs {
builderDefs.meta.function ({
inherit src;
inherit checkFlag;
buildInputs = [];
@ -40,7 +40,7 @@ args : with args;
+ (if args ? extraReplacements then
args.extraReplacements
else ""))["minInit" "doUnpack"];
} args null; /* null is a terminator for sumArgs */
} // args);
in with localDefs;
stdenv.mkDerivation rec {
name = localDefs.name + "deb";

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://crl.nmsu.edu/~mleisher/cu/cu12-1.9.tar.gz;
@ -15,7 +15,7 @@ args : with args; with builderDefs {src="";} null;
mkfontdir
mkfontscale
'') ["minInit" "defEnsureDir" "addInputs"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "clearlyU-12-"+version;

View file

@ -1,9 +1,9 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src =""; /* put a fetchurl here */
buildInputs = [mkfontdir mkfontscale ttmkfdir];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
doInstall = FullDepEntry ("

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://prdownloads.sourceforge.net/junicode/junicode-0.6.15.zip;
@ -13,7 +13,7 @@ args : with args; with builderDefs {src="";} null;
ensureDir $out/share/fonts/junicode-ttf
cp *.ttf $out/share/fonts/junicode-ttf
'') ["minInit" "addInputs" "defEnsureDir"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "junicode-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://prdownloads.sourceforge.net/wqy/wqy-zenhei-0.4.23-1.tar.gz;
@ -12,7 +12,7 @@ args : with args; with builderDefs {src="";} null;
ensureDir $out/share/fonts
cp *.ttf $out/share/fonts
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "wqy-zenhei-"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://www.lambdassociates.org/Download/Qi9.1.zip;
@ -7,7 +7,7 @@ args : with args;
};
buildInputs = [ unzip clisp];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
shell=stdenv.shell;

View file

@ -2,7 +2,7 @@ args: with args;
let
localDefs = builderDefs {
localDefs = builderDefs.meta.function {
src = fetchurl {
url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.5.1.1.tar.gz;
@ -11,7 +11,7 @@ let
buildInputs = [python];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;

View file

@ -2,7 +2,7 @@ args: with args;
let
localDefs = builderDefs {
localDefs = builderDefs.meta.function {
src = fetchurl {
url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.6.4.tar.gz;
@ -11,7 +11,7 @@ let
buildInputs = [python];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;

View file

@ -0,0 +1,26 @@
args :
let
lib = args.lib;
fetchurl = args.fetchurl;
simplyShare = args.simplyShare;
version = lib.getAttr ["version"] "2.0.0" args;
buildInputs = with args; [ ];
in
rec {
src = fetchurl {
url = http://weitz.de/files/cl-ppcre.tar.gz;
sha256 = "14zxrmc4b4q9kg505y9lb0nqp80fpmpwn51xwkqiwkm361n6h23p";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be specified separately */
phaseNames = [(simplyShare "cl-ppcre")];
name = "cl-ppcre-" + version;
meta = {
description = "Common Lisp Portable Perl Compatible RegExp library";
};
}

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src =
fetchurl {
url = ftp://ftp.fftw.org/pub/fftw/fftw-3.1.2.tar.gz;
@ -7,7 +7,7 @@ args : with args;
};
buildInputs = [];
configureFlags = ["--enable-float --enable-shared"];
} null;
};
in with localDefs;
stdenv.mkDerivation {
name = "fftw-3.1.2";

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libdbi-drivers/libdbi-drivers-0.8.2-1.tar.gz;
@ -26,7 +26,7 @@ args : with args;
" --with-sqlite-libdir=${args.sqlite}/lib/sqlite "
] else [])
;
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "libdbi"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libdbi/libdbi-0.8.2.tar.gz;
@ -8,7 +8,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "libdbi"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://gnunet.org/libextractor/download/libextractor-0.5.18.tar.gz;
@ -8,7 +8,7 @@ args : with args;
buildInputs = [ zlib];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "libextractor"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.gnu.org/gnu/indent/indent-2.2.9.tar.gz;
@ -8,7 +8,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
preBuild = FullDepEntry ("

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://ftp.gnome.org/pub/gnome/sources/intltool/0.36/intltool-0.36.2.tar.bz2;
@ -8,7 +8,7 @@ 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";

View file

@ -1,7 +1,7 @@
args : with args; let
patch = ./ltrace_0.5-3.diff.gz;
localDefs = with (builderDefs {src="";} null);
builderDefs {
localDefs = with builderDefs;
builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz;
@ -17,7 +17,7 @@ args : with args; let
gunzip < ${patch} | patch -Np1
sed -e s@-Werror@@ -i Makefile.in
'')["minInit" "doUnpack"];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
preConfigure = FullDepEntry ("

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://savannah.nongnu.org/download/construo/construo-0.2.2.tar.gz;
@ -10,7 +10,7 @@ args : with args;
++ (if args ? mesa then [args.mesa args.freeglut] else [])
;
configureFlags = [""];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
preConfigure = FullDepEntry ("

View file

@ -1,12 +1,12 @@
args: with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
buildInputs =[(wxGTK null)];
src =
fetchurl {
url = http://www.piettes.com/fallingsandgame/fsg-src-4.4.tar.gz;
sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c";
};
} null;
};
in with localDefs;
let
preBuild = FullDepEntry "

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
sha256 = "1kx69f9jqnfzwjh47cl1df8p8hn3bnp6bznxnb6c4wx32ijn5gri";
@ -27,7 +27,7 @@ $out/dump/orbit "\$@"
EOF
chmod a+x $out/bin/space-orbit
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
} null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "space-orbit-"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://downloads.sourceforge.net/madwifi/madwifi-0.9.4.tar.gz;
@ -9,7 +9,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
postInstall = FullDepEntry (''

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = fetchurl {
url = http://snapshots.madwifi.org/madwifi-trunk/madwifi-trunk-r3693-20080602.tar.gz;
sha256 = "0r9nnxcq50rgwcm9y93rpk3mqknl3ixkxkd72437b55qlz1f9vs3";
@ -12,7 +12,7 @@ args : with args;
url = http://people.freebsd.org/~sam/ath_hal-20080528.tgz;
sha256 = "1a6glkd8n46876hl48ib08p81qwsvrk4153j4b9xrxgid6f8bar9";
};
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let
preBuild = FullDepEntry (''

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://download.savannah.gnu.org/releases/dmidecode/dmidecode-2.9.tar.bz2;
@ -9,7 +9,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
makeFlags = "prefix=\$out";
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "dmidecode-"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://sg.torque.net/sg/p/sdparm-1.02.tgz;
@ -8,7 +8,7 @@ args : with args;
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "sdparm-"+version;

View file

@ -1,24 +1,24 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.dict.org/pub/dict/dictd-1.9.15.tar.gz;
sha256 = "0p41yf72l0igmshz6vxy3hm51z25600vrnb9j2jpgws4c03fqnac";
};
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function ((rec {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.dict.org/pub/dict/dictd-1.9.15.tar.gz;
sha256 = "0p41yf72l0igmshz6vxy3hm51z25600vrnb9j2jpgws4c03fqnac";
};
buildInputs = [flex bison which];
configureFlags = [ " --datadir=/var/run/current-system/share/dictd " ];
}) args null; /* null is a terminator for sumArgs */
in with localDefs;
buildInputs = [flex bison which];
configureFlags = [ " --datadir=/var/run/current-system/share/dictd " ];
}) // args);
in with localDefs;
stdenv.mkDerivation rec {
name = "dict-"+version;
builder = writeScript (name + "-builder")
(textClosure localDefs
[doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Dict protocol server and client.
name = "dict-"+version;
builder = writeScript (name + "-builder")
(textClosure localDefs
[doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Dict protocol server and client.
";
inherit src;
};
inherit src;
};
}

View file

@ -1,8 +1,8 @@
{ builderDefs }:
let makeDictdDB = _src: _name: _subdir: _locale:
with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src=_src;
doInstall = FullDepEntry (''
ensureDir $out/share/dictd
@ -13,7 +13,7 @@ with builderDefs {src="";} null;
buildInputs = [];
configureFlags = [];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "dictd-db-${_name}";
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
# Probably a bug in some FreeDict release files, but easier to trivially
# work around than report. Not that it can cause any other problems..
makeDictdDBFreedict = _src: _name: _locale: makeDictdDB _src _name "{.,bin}" _locale;
fetchurl = (builderDefs {src="";} null).fetchurl;
fetchurl = builderDefs.fetchurl;
in

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_4_5.tar.gz;
@ -18,7 +18,7 @@ args : with args; with builderDefs {src="";} null;
ln -s /etc/openfire $out/conf
'')
["minInit" "doUnpack" "addInputs"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "openfire-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_5_2.tar.gz;
@ -18,7 +18,7 @@ args : with args; with builderDefs {src="";} null;
ln -s /etc/openfire $out/conf
'')
["minInit" "doUnpack" "addInputs"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "openfire-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libvncserver/x11vnc-0.9.3.tar.gz;
@ -10,7 +10,7 @@ args : with args; with builderDefs {src="";} null;
zlib libX11 xproto libjpeg libXtst libXinerama xineramaproto
libXrandr randrproto libXext xextproto inputproto recordproto];
configureFlags = [];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "x11vnc-"+version;

View file

@ -1,6 +1,6 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs.meta.function {src="";};
let localDefs = builderDefs.meta.function ((rec {
src = /* put a fetchurl here */
fetchurl {
url = http://fredrik.hubbe.net/x2vnc/x2vnc-1.7.2.tar.gz;
@ -12,7 +12,7 @@ args : with args; with builderDefs {src="";} null;
ensureDir $out
'') ["defEnsureDir"];
configureFlags = [];
}) args null; /* null is a terminator for sumArgs */
}) // args); /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "x2vnc-"+version;

View file

@ -1,10 +1,10 @@
args : with args; with builderDefs {src="";} null;
args : with args; with builderDefs;
let patch =
fetchurl {
url = http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_2.11-2.3.diff.gz;
sha256 = "0bzjhpgg4ih6c76ax8byis9vxgkr2c7bbbshqrkfq8j7ar48n5ld";
};
localDefs = builderDefs (rec {
localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_2.11.orig.tar.gz;
@ -17,7 +17,7 @@ args : with args; with builderDefs {src="";} null;
buildInputs = [];
configureFlags = [];
makeFlags = " PREFIX=$out ";
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "dosfstools-"+version;

View file

@ -1,6 +1,6 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
if args ? src then args.src else fetchcvs {
cvsRoot = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
@ -12,7 +12,7 @@ args : with args;
buildInputs = [ocaml fuse postgresql pcre
e2fsprogs gnomevfs pkgconfig GConf];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
let build = FullDepEntry ("
cd deps

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.chg.ru/mirrors/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/rlwrap-0.28.tar.gz;
@ -8,7 +8,7 @@ args : with args; with builderDefs {src="";} null;
buildInputs = [readline ];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "rlwrap-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.deepspace6.net/pub/ds6/sources/nc6/nc6-1.0.tar.bz2;
@ -8,7 +8,7 @@ let localDefs = builderDefs (rec {
buildInputs = [];
configureFlags = [];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "nc6-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://www.ricardis.tudelft.nl/~vincent/fusesmb/download/fusesmb-0.8.7.tar.gz;
@ -14,7 +14,7 @@ args : with args; with builderDefs {src="";} null;
ln -fs ${samba}/lib/libsmbclient.so $out/lib/libsmbclient.so.0
'')
[ "minInit" "defEnsureDir" "doMakeInstall"];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "smbfs-fuse-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://prdownloads.sourceforge.net/sourceforge/bmrsa/bmrsa11.zip;
@ -16,7 +16,7 @@ args : with args; with builderDefs {src="";} null;
ensureDir $out/bin
echo -e 'install:\n\tcp bmrsa '$out'/bin' >> Makefile
'') ["minInit" "addInputs" "defEnsureDir"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "bmrsa-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function ((rec {
src = /* put a fetchurl here */
fetchurl {
url = http://freshmeat.net/redir/seccure/65485/url_tgz/seccure-0.3.tar.gz;
@ -12,7 +12,7 @@ args : with args; with builderDefs {src="";} null;
sed -e s@/usr/@$out/@g -i Makefile
ensureDir $out/bin $out/share/man/man1
'') ["minInit" "doUnpack" "defEnsureDir"];
}) args null; /* null is a terminator for sumArgs */
}) // args);
in with localDefs;
stdenv.mkDerivation rec {
name = "seccure-"+version;

View file

@ -1,5 +1,5 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
args : with args; with builderDefs;
let localDefs = builderDefs.meta.function (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://point-at-infinity.org/ssss/ssss-0.5.tar.gz;
@ -15,7 +15,7 @@ args : with args; with builderDefs {src="";} null;
ensureDir $out/bin $out/share/man/man1
echo -e 'install:\n\tcp ssss-combine ssss-split '"$out"'/bin' >>Makefile
'') ["minInit" "doUnpack" "defEnsureDir"];
}) null; /* null is a terminator for sumArgs */
});
in with localDefs;
stdenv.mkDerivation rec {
name = "ssss-"+version;

View file

@ -1,5 +1,5 @@
args : with args;
let localDefs = builderDefs {
let localDefs = builderDefs.meta.function {
src = /* put a fetchurl here */
fetchurl {
url = http://downloads.sourceforge.net/gdmap/gdmap-0.8.1.tar.gz;
@ -8,7 +8,7 @@ args : with args;
buildInputs = [gtk pkgconfig libxml2 intltool gettext];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
};
in with localDefs;
stdenv.mkDerivation rec {
name = "gdmap"+version;

View file

@ -248,14 +248,13 @@ let pkgs = rec {
abort ("Unknown option specified: " + result))
else x);
builderDefs = lib.sumArgs (import ./builder-defs.nix) {
builderDefs = composedArgsAndFun (import ./builder-defs.nix) {
inherit stringsWithDeps lib stdenv writeScript fetchurl;
};
composedArgsAndFun = lib.composedArgsAndFun;
builderDefsPackage = expr: composedArgsAndFun
(((builderDefs null).builderDefsPackage builderDefs) expr);
builderDefsPackage = builderDefs.builderDefsPackage builderDefs;
stringsWithDeps = import ../lib/strings-with-deps.nix {
inherit stdenv lib;
@ -2547,6 +2546,9 @@ let pkgs = rec {
inherit fetchurl stdenv python;
};
clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) {
};
cluceneCore = (import ../development/libraries/clucene-core) {
inherit fetchurl stdenv;
};
@ -6592,8 +6594,8 @@ let pkgs = rec {
inherit (xlibs) libXmu;
};
sndBase = composedArgsAndFun (import ../applications/audio/snd) {
inherit fetchurl stdenv builderDefs stringsWithDeps lib fftw;
sndBase = builderDefsPackage (import ../applications/audio/snd) {
inherit fetchurl stdenv stringsWithDeps lib fftw;
inherit pkgconfig gmp gettext;
inherit (xlibs) libXpm libX11;
inherit (gtkLibs) gtk glib;

View file

@ -458,8 +458,11 @@ args: with args; with stringsWithDeps; with lib;
extraDerivationAttrs = lib.getAttr ["extraDerivationAttrs"] {} args;
builderDefsPackage = bd: func: args: (
let localDefs = bd (func ((bd null) // args)) args null; in
# for overrides..
builderDefsArgs = args;
innerBuilderDefsPackage = bd: func: args: (
let localDefs = bd.meta.function ((func (bd // args)) // args); in
stdenv.mkDerivation ((rec {
inherit (localDefs) name;
@ -471,6 +474,9 @@ args: with args; with stringsWithDeps; with lib;
} else {}) // extraDerivationAttrs)
);
builderDefsPackage = bd: func: args: (composedArgsAndFun
(innerBuilderDefsPackage bd func) ((func (bd // args)) // args));
generateFontsFromSFD = noDepEntry(''
for i in *.sfd; do
${args.fontforge}/bin/fontforge -c \