replacing applyAndFun by lib.defaultOverridableDelayableArgs
applyAndFun has a bug resulting in the same arg beeing added more than once when using a concatenating merge function for the attr set. I've tried giving the function a name "overridableDelayableArgs" which resembles its usage much more. important refactoring: applyAndFun had .fun and .funMerge only when passing the merge function lib.mergeOrApply composableDerivation { initial = { ... }; } to overridableDelayableArgs has always .replace and .merge composableDerivation {} { ... } svn path=/nixpkgs/trunk/; revision=14428
This commit is contained in:
parent
51289a41b0
commit
b56ed35851
@ -2,8 +2,7 @@
|
||||
# but I have gvim with python support now :) - Marc
|
||||
args: with args;
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
initial = {
|
||||
composableDerivation {} {
|
||||
|
||||
name = "vim_configurable-7.1";
|
||||
|
||||
@ -73,6 +72,4 @@ composableDerivation {
|
||||
homepage = "www.vim.org";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
args: with args;
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
|
||||
initial = {
|
||||
composableDerivation {} {
|
||||
|
||||
name = "sox-14.0.0";
|
||||
|
||||
@ -57,5 +55,4 @@ composableDerivation {
|
||||
name="libsamplerate Commercial Use License";
|
||||
} ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -3,8 +3,7 @@ let edf = composableDerivation.edf;
|
||||
optionIncLib = name : attr : " -D${name}_INCLUDE_DIR=${__getAttr attr args}/incclude"
|
||||
+ " -D${name}_LIBRARY=${__getAttr attr args}/lib "; # lib 64?
|
||||
in
|
||||
composableDerivation.composableDerivation {
|
||||
initial = {
|
||||
composableDerivation.composableDerivation {} {
|
||||
|
||||
buildInputs = [ gdal cmake qt flex bison proj geos x11 sqlite gsl];
|
||||
cfgOption = [
|
||||
@ -41,5 +40,4 @@ composableDerivation.composableDerivation {
|
||||
#configurePhase="./autogen.sh --prefix=\$out --with-gdal=\$gdal/bin/gdal-config --with-qtdir=\$qt";
|
||||
# buildPhases="unpackPhase buildPhase";
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
args: with args;
|
||||
let edf = composableDerivation.edf;
|
||||
wwf = composableDerivation.wwf; in
|
||||
composableDerivation.composableDerivation {
|
||||
initial = {
|
||||
composableDerivation.composableDerivation {} {
|
||||
|
||||
name="hugs98";
|
||||
|
||||
@ -52,5 +51,4 @@ composableDerivation.composableDerivation {
|
||||
description = "The HUGS98 Haskell <interpreter";
|
||||
homepage = http://www.haskell.org/hugs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
args: with args;
|
||||
let edf = composableDerivation.edf; in
|
||||
composableDerivation.composableDerivation {
|
||||
initial = {
|
||||
composableDerivation.composableDerivation {} {
|
||||
name = "roadsend-2.9.3";
|
||||
buildInputs = [bigloo curl];
|
||||
flags = edf { name = "pcre"; }
|
||||
@ -34,5 +33,4 @@ composableDerivation.composableDerivation {
|
||||
# Runtime license is LPGL 2.1
|
||||
license = ["GPL2"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -4,8 +4,7 @@ args: with args;
|
||||
|
||||
let inherit (args.composableDerivation) composableDerivation edf wwf; in
|
||||
|
||||
composableDerivation {
|
||||
initial = fixed : {
|
||||
composableDerivation {} ( fixed : {
|
||||
|
||||
name = "php_configurable-${version}";
|
||||
|
||||
@ -175,6 +174,4 @@ composableDerivation {
|
||||
|
||||
patches = [./fix.patch];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -129,7 +129,7 @@ in
|
||||
### python libraries:
|
||||
|
||||
wxPythonBaseFun = (t.pythonLibSetup.merge (a :
|
||||
let inherit (a.fixed) wxGTK version; in
|
||||
let inherit (a.fixed.passthru) wxGTK; inherit (a.fixed) version; in
|
||||
{
|
||||
buildInputs = [p.pkgconfig wxGTK (wxGTK.gtk)];
|
||||
setupFlags=["WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=0 BUILD_OGL=0 UNICODE=1"];
|
||||
@ -196,7 +196,7 @@ in
|
||||
# If you install dozens of python packages this might be bloat.
|
||||
# So I think the overhead of installing these packages into the same store path should be prefered.
|
||||
pygtkBaseFun = (t.pythonLibStub.merge (a :
|
||||
let inherit (a.fixed) glib gtk; in lib.mergeAttrsByFuncDefaults [
|
||||
let inherit (a.fixed.passthru) glib gtk; in lib.mergeAttrsByFuncDefaults [
|
||||
{
|
||||
unpackPhase = "true";
|
||||
configurePhase = "true";
|
||||
@ -312,7 +312,7 @@ in
|
||||
|
||||
pygtk212 = t.pygtkBaseFun.merge (a : {
|
||||
version = "2.12.1";
|
||||
name = "pygobject-${a.fixed.pygobjectVersion}-and-pygtk-${a.fixed.version}";
|
||||
name = "pygobject-${a.fixed.passthru.pygobjectVersion}-and-pygtk-${a.fixed.version}";
|
||||
pygtkSrc = fetchurl {
|
||||
url = http://ftp.acc.umu.se/pub/GNOME/sources/pygtk/2.12/pygtk-2.12.1.tar.bz2;
|
||||
sha256 = "0gg13xgr7y9sppw8bdys042928nc66czn74g60333c4my95ys021";
|
||||
|
@ -1,7 +1,6 @@
|
||||
args: with args;
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
initial = {
|
||||
composableDerivation {} {
|
||||
|
||||
name = "fltk-2.0.x-r6483";
|
||||
|
||||
@ -43,5 +42,4 @@ composableDerivation {
|
||||
description = "a C++ cross platform lightweight gui library binding";
|
||||
homepage = http://www.fltk.org;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
args: with args;
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
|
||||
initial = {
|
||||
composableDerivation {} {
|
||||
|
||||
buildInputs = [ "which" ]; # which is needed for the autogen.sh
|
||||
|
||||
@ -34,5 +32,4 @@ composableDerivation {
|
||||
homepage = http://geos.refractions.net/;
|
||||
license = "GPL";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
args: with args;
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
initial = {
|
||||
composableDerivation {} {
|
||||
|
||||
flags = { }
|
||||
# TODO! implement flags
|
||||
# I want to get kino and cinelerra working. That's why I don't spend more time on this now
|
||||
@ -25,5 +25,4 @@ composableDerivation {
|
||||
# you can choose one of the following licenses:
|
||||
license = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -5,8 +5,7 @@ let
|
||||
name = "ragel-${version}";
|
||||
in
|
||||
|
||||
composableDerivation.composableDerivation {
|
||||
initial = rec {
|
||||
composableDerivation.composableDerivation {} {
|
||||
inherit name;
|
||||
src = fetchurl {
|
||||
url = "http://www.complang.org/ragel/${name}.tar.gz";
|
||||
@ -40,5 +39,4 @@ composableDerivation.composableDerivation {
|
||||
description = "State machine compiler";
|
||||
license = "GPL-2";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -12,14 +12,12 @@ let inherit (lib) nv nvs; in
|
||||
# TODO add newer example using new syntax (kernel derivation proposal -> mailinglist)
|
||||
composableDerivation = {
|
||||
mkDerivation ? pkgs.stdenv.mkDerivation,
|
||||
# initial set of arguments to be passed to stdenv.mkDerivation passing prepareDerivationArgs by default
|
||||
initial ? {},
|
||||
|
||||
# list of functions to be applied before defaultOverridableDelayableArgs removes removeAttrs names
|
||||
# prepareDerivationArgs handles derivation configurations
|
||||
# applyPreTidy ? [ lib.prepareDerivationArgs ],
|
||||
applyPreTidy ? [],
|
||||
applyPreTidy ? [ lib.prepareDerivationArgs ],
|
||||
|
||||
# consider adding addtional elements by derivation.merge { removeAttrs = ["elem"]; };
|
||||
removeAttrs ? ["cfg" "flags"]
|
||||
|
||||
}: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
|
||||
|
@ -1,9 +1,8 @@
|
||||
args: with args;
|
||||
let edf = composableDerivation.edf;
|
||||
name = "gxemul-0.4.6"; in
|
||||
composableDerivation.composableDerivation {
|
||||
composableDerivation.composableDerivation {} {
|
||||
|
||||
initial = {
|
||||
inherit name;
|
||||
flags = {
|
||||
doc = { installPhase = "ensureDir \$out/share/${name}; cp -r doc \$out/share/${name};"; implies = "man"; };
|
||||
@ -33,5 +32,4 @@ composableDerivation.composableDerivation {
|
||||
};
|
||||
|
||||
mergeAttrBy = { installPhase = a : b : "${a}\n${b}"; };
|
||||
};
|
||||
}
|
||||
|
@ -2,8 +2,7 @@
|
||||
# still much to test but it compiles now
|
||||
args:
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
initial = {
|
||||
composableDerivation {} {
|
||||
buildInputs = [ args.pkgconfig ];
|
||||
flags =
|
||||
# FIXME: tidy up
|
||||
@ -49,5 +48,4 @@ composableDerivation {
|
||||
homepage = "http://jackaudio.org";
|
||||
license = "GPL";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -8946,7 +8946,7 @@ let
|
||||
};
|
||||
|
||||
# doesn't compile yet - in case someone else want's to continue ..
|
||||
qgis = composedArgsAndFun (selectVersion ../applications/misc/qgis "0.11.0") {
|
||||
qgis = (selectVersion ../applications/misc/qgis "0.11.0") {
|
||||
inherit composableDerivation fetchsvn stdenv flex lib
|
||||
ncurses fetchurl perl cmake gdal geos proj x11
|
||||
gsl libpng zlib bison
|
||||
|
Loading…
x
Reference in New Issue
Block a user