big breaking change: renaming lib.getAttr to lib.attrByPath
getAttr was ambiguous. It's also a builtin function fix svn path=/nixpkgs/trunk/; revision=15692
This commit is contained in:
parent
62620f0411
commit
f7f938a1d1
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "9.4" args;
|
version = lib.attrByPath ["version"] "9.4" args;
|
||||||
buildInputs = with args; [gtk glib pkgconfig
|
buildInputs = with args; [gtk glib pkgconfig
|
||||||
libXpm gmp gettext libX11 fftw]
|
libXpm gmp gettext libX11 fftw]
|
||||||
++ (lib.optional (args ? ruby) args.ruby)
|
++ (lib.optional (args ? ruby) args.ruby)
|
||||||
|
|
|
@ -9,25 +9,29 @@
|
||||||
# Why use a local copy? This way it's easier to use the update manager to get plugins :-)
|
# Why use a local copy? This way it's easier to use the update manager to get plugins :-)
|
||||||
|
|
||||||
|
|
||||||
{fetchurl, stdenv, jdk, gtk, glib, libXtst, plugins ? []}:
|
{fetchurl, stdenv, jdk, gtk, glib, libXtst, makeOverridable, plugins ? [], unzip}:
|
||||||
|
|
||||||
let {
|
let eclipseFun =
|
||||||
body =
|
makeOverridable ({name, bindist} :
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "eclipse-sdk-3.5M6";
|
inherit name;
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
src = bindist;
|
src = bindist;
|
||||||
buildInputs = [];
|
buildInputs = [ unzip /* unzip required by eclipseCDT */ ];
|
||||||
inherit jdk plugins;
|
inherit jdk plugins;
|
||||||
libraries = [gtk glib libXtst];
|
libraries = [gtk glib libXtst];
|
||||||
};
|
}); in
|
||||||
|
|
||||||
bindist =
|
eclipseFun {
|
||||||
if (stdenv.system == "x86_64-linux") then fetchurl {
|
# you can override these settings usnig .override {...}
|
||||||
url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk-x86_64.tar.gz;
|
name = "eclipse-sdk-3.5M6";
|
||||||
sha256 = "10p4idp5rcdf7xqwfk3kvmjxhi8x1v835m0y4pn9q4nhfb5643pi";
|
|
||||||
} else fetchurl {
|
bindist =
|
||||||
url = ftp://mirror.micromata.de/eclipse/eclipse/downloads/drops/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk.tar.gz;
|
if (stdenv.system == "x86_64-linux") then fetchurl {
|
||||||
sha256 = "1z8j26b632ydhqrmwgbcqgiq7f1a542jam06z2h62mcbqazrcyah";
|
url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk-x86_64.tar.gz;
|
||||||
};
|
sha256 = "10p4idp5rcdf7xqwfk3kvmjxhi8x1v835m0y4pn9q4nhfb5643pi";
|
||||||
}
|
} else fetchurl {
|
||||||
|
url = ftp://mirror.micromata.de/eclipse/eclipse/downloads/drops/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk.tar.gz;
|
||||||
|
sha256 = "1z8j26b632ydhqrmwgbcqgiq7f1a542jam06z2h62mcbqazrcyah";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{stdenv, fetchurl}:
|
|
||||||
|
|
||||||
fetchurl {
|
|
||||||
url = http://www.ii.uib.no/~karltk/spoofax/plugins/org.spoofax.editor_0.3.11.jar;
|
|
||||||
md5 = "c36941afcb0e538e16fafd594eae128e";
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
{stdenv, fetchurl, panotools, cmake, wxGTK, libtiff, libpng, openexr, boost, pkgconfig, exiv2, gettext, ilmbase }:
|
{stdenv, fetchurl, panotools, cmake, wxGTK, libtiff, libpng, openexr, boost,
|
||||||
|
pkgconfig, exiv2, gettext, ilmbase, enblendenfuse, autopanosiftc }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "hugin-0.7.0";
|
name = "hugin-0.7.0";
|
||||||
|
@ -35,6 +36,10 @@ stdenv.mkDerivation {
|
||||||
eval -- "cmake .. $cmakeFlags"
|
eval -- "cmake .. $cmakeFlags"
|
||||||
set +x
|
set +x
|
||||||
'';
|
'';
|
||||||
|
postInstall = ''
|
||||||
|
ensureDir $out/nix-support
|
||||||
|
echo ${enblendenfuse} ${autopanosiftc} > $out/nix-support/$out/nix-support/propagated-user-env-packages
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://hugin.sourceforge.net/;
|
homepage = http://hugin.sourceforge.net/;
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "3.4" a;
|
version = a.lib.attrByPath ["version"] "3.4" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
aalib gsl libpng libX11 xproto libXext xextproto
|
aalib gsl libpng libX11 xproto libXext xextproto
|
||||||
libXt zlib gettext intltool perl
|
libXt zlib gettext intltool perl
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args; let localDefs = builderDefs.passthru.function (args // rec {
|
args : with args; let localDefs = builderDefs.passthru.function (args // rec {
|
||||||
version = lib.getAttr ["version"] "5.07" args;
|
version = lib.attrByPath ["version"] "5.07" args;
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "http://www.jwz.org/xscreensaver/xscreensaver-${version}.tar.gz";
|
url = "http://www.jwz.org/xscreensaver/xscreensaver-${version}.tar.gz";
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
doPatchShebangs = args.doPatchShebangs;
|
doPatchShebangs = args.doPatchShebangs;
|
||||||
makeManyWrappers = args.makeManyWrappers;
|
makeManyWrappers = args.makeManyWrappers;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.0.21" args;
|
version = lib.attrByPath ["version"] "0.0.21" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
intltool python imagemagick gtk glib webkit libxml2
|
intltool python imagemagick gtk glib webkit libxml2
|
||||||
gtksourceview pkgconfig which gettext makeWrapper
|
gtksourceview pkgconfig which gettext makeWrapper
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "1.12.0" a;
|
version = a.lib.attrByPath ["version"] "1.12.0" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
firefox libX11 xproto
|
firefox libX11 xproto
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,7 +5,7 @@ args : with args;
|
||||||
(to use a fresher pidgin build)
|
(to use a fresher pidgin build)
|
||||||
*/
|
*/
|
||||||
let
|
let
|
||||||
externalPurple2 = (lib.getAttr ["purple2Source"] null args) != null;
|
externalPurple2 = lib.attrByPath ["purple2Source"] null args) != null;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
|
|
@ -5,7 +5,7 @@ args : with args;
|
||||||
(to use a fresher pidgin build)
|
(to use a fresher pidgin build)
|
||||||
*/
|
*/
|
||||||
let
|
let
|
||||||
externalPurple2 = (lib.getAttr ["purple2Source"] null args) != null;
|
externalPurple2 = (lib.attrByPath ["purple2Source"] null args) != null;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.12.1" a;
|
version = a.lib.attrByPath ["version"] "0.12.1" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
python pyGtkGlade gtk perl intltool dbus gettext
|
python pyGtkGlade gtk perl intltool dbus gettext
|
||||||
pkgconfig makeWrapper libglade pyopenssl libXScrnSaver
|
pkgconfig makeWrapper libglade pyopenssl libXScrnSaver
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
let version = lib.getAttr ["version"] "1.1.0" args; in
|
let version = lib.attrByPath ["version"] "1.1.0" args; in
|
||||||
rec {
|
rec {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://downloads.sourceforge.net/ofset/drgeo-1.1.0.tar.gz;
|
url = http://downloads.sourceforge.net/ofset/drgeo-1.1.0.tar.gz;
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "3.3.0" args;
|
version = lib.attrByPath ["version"] "3.3.0" args;
|
||||||
_buildInputs = with args; [
|
_buildInputs = with args; [
|
||||||
python e2fsprogs gnutls pkgconfig libjpeg
|
python e2fsprogs gnutls pkgconfig libjpeg
|
||||||
ncurses SDL libvncserver zlib graphviz ghostscript
|
ncurses SDL libvncserver zlib graphviz ghostscript
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
buildInputs = lib.attrVals ["clisp" "texinfo"] args;
|
buildInputs = lib.attrVals ["clisp" "texinfo"] args;
|
||||||
version = lib.getAttr ["version"] "0.9.4.1" args;
|
version = lib.attrByPath ["version"] "0.9.4.1" args;
|
||||||
|
|
||||||
pkgName = "stumpwm";
|
pkgName = "stumpwm";
|
||||||
in
|
in
|
||||||
|
|
|
@ -3,14 +3,14 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
{
|
{
|
||||||
inherit writeScript;
|
inherit writeScript;
|
||||||
|
|
||||||
src = getAttr ["src"] "" args;
|
src = attrByPath ["src"] "" args;
|
||||||
|
|
||||||
addSbinPath = getAttr ["addSbinPath"] false args;
|
addSbinPath = attrByPath ["addSbinPath"] false args;
|
||||||
|
|
||||||
forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"];
|
forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"];
|
||||||
forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL"
|
forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL"
|
||||||
"README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++
|
"README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++
|
||||||
(optional (getAttr ["forceCopyDoc"] true args) "doc");
|
(optional (attrByPath ["forceCopyDoc"] true args) "doc");
|
||||||
|
|
||||||
hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
|
hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
(if args ? goSrcDir then args.goSrcDir else "")
|
(if args ? goSrcDir then args.goSrcDir else "")
|
||||||
) ["minInit"];
|
) ["minInit"];
|
||||||
|
|
||||||
configureCommand = getAttr ["configureCommand"] "./configure" args;
|
configureCommand = attrByPath ["configureCommand"] "./configure" args;
|
||||||
|
|
||||||
doConfigure = fullDepEntry ("
|
doConfigure = fullDepEntry ("
|
||||||
${configureCommand} --prefix=\"\$prefix\" ${toString configureFlags}
|
${configureCommand} --prefix=\"\$prefix\" ${toString configureFlags}
|
||||||
|
@ -276,8 +276,8 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
'') ["minInit" "addInputs" "doUnpack"];
|
'') ["minInit" "addInputs" "doUnpack"];
|
||||||
|
|
||||||
doMakeInstall = fullDepEntry ("
|
doMakeInstall = fullDepEntry ("
|
||||||
make ${toString (getAttr ["makeFlags"] "" args)} "+
|
make ${toString (attrByPath ["makeFlags"] "" args)} "+
|
||||||
"${toString (getAttr ["installFlags"] "" args)} install") ["doMake"];
|
"${toString (attrByPath ["installFlags"] "" args)} install") ["doMake"];
|
||||||
|
|
||||||
doForceShare = fullDepEntry ("
|
doForceShare = fullDepEntry ("
|
||||||
ensureDir \"\$prefix/share\"
|
ensureDir \"\$prefix/share\"
|
||||||
|
@ -302,7 +302,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
|
|
||||||
patchFlags = if args ? patchFlags then args.patchFlags else "-p1";
|
patchFlags = if args ? patchFlags then args.patchFlags else "-p1";
|
||||||
|
|
||||||
patches = getAttr ["patches"] [] args;
|
patches = attrByPath ["patches"] [] args;
|
||||||
|
|
||||||
toPatchCommand = s: "cat ${s} | patch ${toString patchFlags}";
|
toPatchCommand = s: "cat ${s} | patch ${toString patchFlags}";
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
(${envAdderList env}
|
(${envAdderList env}
|
||||||
echo '\"'\"${cmd}-orig\"'\"' '\"'\\\$@'\"' \n) > \"${cmd}\"";
|
echo '\"'\"${cmd}-orig\"'\"' '\"'\\\$@'\"' \n) > \"${cmd}\"";
|
||||||
|
|
||||||
doWrap = cmd: fullDepEntry (wrapEnv cmd (getAttr ["wrappedEnv"] [] args)) ["minInit"];
|
doWrap = cmd: fullDepEntry (wrapEnv cmd (attrByPath ["wrappedEnv"] [] args)) ["minInit"];
|
||||||
|
|
||||||
makeManyWrappers = wildcard : wrapperFlags : fullDepEntry (''
|
makeManyWrappers = wildcard : wrapperFlags : fullDepEntry (''
|
||||||
for i in ${wildcard}; do
|
for i in ${wildcard}; do
|
||||||
|
@ -347,7 +347,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
|
|
||||||
doPropagate = fullDepEntry ("
|
doPropagate = fullDepEntry ("
|
||||||
ensureDir \$out/nix-support
|
ensureDir \$out/nix-support
|
||||||
echo '${toString (getAttr ["propagatedBuildInputs"] [] args)}' >\$out/nix-support/propagated-build-inputs
|
echo '${toString (attrByPath ["propagatedBuildInputs"] [] args)}' >\$out/nix-support/propagated-build-inputs
|
||||||
") ["minInit" "defEnsureDir"];
|
") ["minInit" "defEnsureDir"];
|
||||||
|
|
||||||
/*debug = x:(__trace x x);
|
/*debug = x:(__trace x x);
|
||||||
|
@ -356,37 +356,37 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
replaceScriptVar = file: name: value: "sed -e 's`^${name}=.*`${name}='\\''${value}'\\''`' -i ${file}";
|
replaceScriptVar = file: name: value: "sed -e 's`^${name}=.*`${name}='\\''${value}'\\''`' -i ${file}";
|
||||||
replaceInScript = file: l: concatStringsSep "\n" ((pairMap (replaceScriptVar file) l));
|
replaceInScript = file: l: concatStringsSep "\n" ((pairMap (replaceScriptVar file) l));
|
||||||
replaceScripts = l: concatStringsSep "\n" (pairMap replaceInScript l);
|
replaceScripts = l: concatStringsSep "\n" (pairMap replaceInScript l);
|
||||||
doReplaceScripts = fullDepEntry (replaceScripts (getAttr ["shellReplacements"] [] args)) ["minInit"];
|
doReplaceScripts = fullDepEntry (replaceScripts (attrByPath ["shellReplacements"] [] args)) ["minInit"];
|
||||||
makeNest = x: if x == defNest.text then x else "startNest\n" + x + "\nstopNest\n";
|
makeNest = x: if x == defNest.text then x else "startNest\n" + x + "\nstopNest\n";
|
||||||
textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps);
|
textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps);
|
||||||
|
|
||||||
inherit noDepEntry fullDepEntry packEntry;
|
inherit noDepEntry fullDepEntry packEntry;
|
||||||
|
|
||||||
defList = getAttr ["defList"] [] args;
|
defList = attrByPath ["defList"] [] args;
|
||||||
getVal = getValue args defList;
|
getVal = getValue args defList;
|
||||||
check = checkFlag args;
|
check = checkFlag args;
|
||||||
reqsList = getAttr ["reqsList"] [] args;
|
reqsList = attrByPath ["reqsList"] [] args;
|
||||||
buildInputsNames = filter (x: null != getVal x)
|
buildInputsNames = filter (x: null != getVal x)
|
||||||
(uniqList {inputList =
|
(uniqList {inputList =
|
||||||
(concatLists (map
|
(concatLists (map
|
||||||
(x: if x==[] then [] else builtins.tail x)
|
(x: if x==[] then [] else builtins.tail x)
|
||||||
reqsList));});
|
reqsList));});
|
||||||
configFlags = getAttr ["configFlags"] [] args;
|
configFlags = attrByPath ["configFlags"] [] args;
|
||||||
buildFlags = getAttr ["buildFlags"] [] args;
|
buildFlags = attrByPath ["buildFlags"] [] args;
|
||||||
nameSuffixes = getAttr ["nameSuffixes"] [] args;
|
nameSuffixes = attrByPath ["nameSuffixes"] [] args;
|
||||||
autoBuildInputs = assert (checkReqs args defList reqsList);
|
autoBuildInputs = assert (checkReqs args defList reqsList);
|
||||||
filter (x: x!=null) (map getVal buildInputsNames);
|
filter (x: x!=null) (map getVal buildInputsNames);
|
||||||
autoConfigureFlags = condConcat "" configFlags check;
|
autoConfigureFlags = condConcat "" configFlags check;
|
||||||
autoMakeFlags = condConcat "" buildFlags check;
|
autoMakeFlags = condConcat "" buildFlags check;
|
||||||
useConfig = getAttr ["useConfig"] false args;
|
useConfig = attrByPath ["useConfig"] false args;
|
||||||
realBuildInputs =
|
realBuildInputs =
|
||||||
lib.closePropagation ((if useConfig then
|
lib.closePropagation ((if useConfig then
|
||||||
autoBuildInputs else
|
autoBuildInputs else
|
||||||
getAttr ["buildInputs"] [] args)++
|
attrByPath ["buildInputs"] [] args)++
|
||||||
(getAttr ["propagatedBuildInputs"] [] args));
|
(attrByPath ["propagatedBuildInputs"] [] args));
|
||||||
configureFlags = if useConfig then autoConfigureFlags else
|
configureFlags = if useConfig then autoConfigureFlags else
|
||||||
getAttr ["configureFlags"] "" args;
|
attrByPath ["configureFlags"] "" args;
|
||||||
makeFlags = if useConfig then autoMakeFlags else getAttr ["makeFlags"] "" args;
|
makeFlags = if useConfig then autoMakeFlags else attrByPath ["makeFlags"] "" args;
|
||||||
|
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
x.text + "\n" + after ;};
|
x.text + "\n" + after ;};
|
||||||
|
|
||||||
createDirs = fullDepEntry (concatStringsSep ";"
|
createDirs = fullDepEntry (concatStringsSep ";"
|
||||||
(map (x: "ensureDir ${x}") (getAttr ["neededDirs"] [] args))
|
(map (x: "ensureDir ${x}") (attrByPath ["neededDirs"] [] args))
|
||||||
) ["minInit" "defEnsureDir"];
|
) ["minInit" "defEnsureDir"];
|
||||||
|
|
||||||
copyExtraDoc = fullDepEntry (''
|
copyExtraDoc = fullDepEntry (''
|
||||||
|
@ -404,20 +404,20 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
'' + (concatStringsSep ";"
|
'' + (concatStringsSep ";"
|
||||||
(map
|
(map
|
||||||
(x: ''cp "${x}" "$out/share/doc/$name" || true;'')
|
(x: ''cp "${x}" "$out/share/doc/$name" || true;'')
|
||||||
(getAttr ["extraDoc"] [] args)))) ["minInit" "defEnsureDir" "doUnpack"];
|
(attrByPath ["extraDoc"] [] args)))) ["minInit" "defEnsureDir" "doUnpack"];
|
||||||
|
|
||||||
realPhaseNames =
|
realPhaseNames =
|
||||||
(optional ([] != getAttr ["neededDirs"] [] args) "createDirs")
|
(optional ([] != attrByPath ["neededDirs"] [] args) "createDirs")
|
||||||
++
|
++
|
||||||
args.phaseNames
|
args.phaseNames
|
||||||
++
|
++
|
||||||
["doForceShare" "doPropagate" "doForceCopy"]
|
["doForceShare" "doPropagate" "doForceCopy"]
|
||||||
++
|
++
|
||||||
(optional ([] != getAttr ["extraDoc"] [] args) "copyExtraDoc")
|
(optional ([] != attrByPath ["extraDoc"] [] args) "copyExtraDoc")
|
||||||
++
|
++
|
||||||
(optional (getAttr ["doCheck"] false args) "doMakeCheck")
|
(optional (attrByPath ["doCheck"] false args) "doMakeCheck")
|
||||||
++
|
++
|
||||||
(optional (getAttr ["alwaysFail"] false args) "doFail")
|
(optional (attrByPath ["alwaysFail"] false args) "doFail")
|
||||||
;
|
;
|
||||||
|
|
||||||
doFail = noDepEntry "
|
doFail = noDepEntry "
|
||||||
|
@ -429,7 +429,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
make check
|
make check
|
||||||
'') ["minInit"];
|
'') ["minInit"];
|
||||||
|
|
||||||
extraDerivationAttrs = lib.getAttr ["extraDerivationAttrs"] {} args;
|
extraDerivationAttrs = lib.attrByPath ["extraDerivationAttrs"] {} args;
|
||||||
|
|
||||||
# for overrides..
|
# for overrides..
|
||||||
builderDefsArgs = args;
|
builderDefsArgs = args;
|
||||||
|
@ -459,14 +459,14 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
'Open($1);
|
'Open($1);
|
||||||
${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands
|
${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands
|
||||||
}Reencode("unicode");
|
}Reencode("unicode");
|
||||||
${optionalString (getAttr ["createTTF"] true args) ''Generate($1:r + ".ttf");''}
|
${optionalString (attrByPath ["createTTF"] true args) ''Generate($1:r + ".ttf");''}
|
||||||
${optionalString (getAttr ["createOTF"] true args) ''Generate($1:r + ".otf");''}
|
${optionalString (attrByPath ["createOTF"] true args) ''Generate($1:r + ".otf");''}
|
||||||
Reencode("TeX-Base-Encoding");
|
Reencode("TeX-Base-Encoding");
|
||||||
${optionalString (getAttr ["createAFM"] true args) ''Generate($1:r + ".afm");''}
|
${optionalString (attrByPath ["createAFM"] true args) ''Generate($1:r + ".afm");''}
|
||||||
${optionalString (getAttr ["createPFM"] true args) ''Generate($1:r + ".pfm");''}
|
${optionalString (attrByPath ["createPFM"] true args) ''Generate($1:r + ".pfm");''}
|
||||||
${optionalString (getAttr ["createPFB"] true args) ''Generate($1:r + ".pfb");''}
|
${optionalString (attrByPath ["createPFB"] true args) ''Generate($1:r + ".pfb");''}
|
||||||
${optionalString (getAttr ["createMAP"] true args) ''Generate($1:r + ".map");''}
|
${optionalString (attrByPath ["createMAP"] true args) ''Generate($1:r + ".map");''}
|
||||||
${optionalString (getAttr ["createENC"] true args) ''Generate($1:r + ".enc");''}
|
${optionalString (attrByPath ["createENC"] true args) ''Generate($1:r + ".enc");''}
|
||||||
' $i;
|
' $i;
|
||||||
done
|
done
|
||||||
'') ["minInit" "addInputs" "doUnpack"];
|
'') ["minInit" "addInputs" "doUnpack"];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "" a;
|
version = a.lib.attrByPath ["version"] "" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -16,14 +16,14 @@ let
|
||||||
checkAttrInclusion = s: a: b:
|
checkAttrInclusion = s: a: b:
|
||||||
(
|
(
|
||||||
if (! isAttrs b) then s else
|
if (! isAttrs b) then s else
|
||||||
if (lib.getAttr ["_type"] "" b) == "option" then "" else
|
if (lib.attrByPath ["_type"] "" b) == "option" then "" else
|
||||||
findInList (x : x != "")
|
findInList (x : x != "")
|
||||||
( map (x: if (x == "servicesProposal") # this attr will be checked at another place ( -> upstart-jobs/default.nix )
|
( map (x: if (x == "servicesProposal") # this attr will be checked at another place ( -> upstart-jobs/default.nix )
|
||||||
then ""
|
then ""
|
||||||
else checkAttrInclusion
|
else checkAttrInclusion
|
||||||
(s + "." + x)
|
(s + "." + x)
|
||||||
(__getAttr x a)
|
(__getAttr x a)
|
||||||
(lib.getAttr [x] null b))
|
(lib.attrByPath [x] null b))
|
||||||
(attrNames a)) ""
|
(attrNames a)) ""
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
|
|
@ -2,7 +2,7 @@ args : with args;
|
||||||
let
|
let
|
||||||
localDefs = with (builderDefs.passthru.function {src="";});
|
localDefs = with (builderDefs.passthru.function {src="";});
|
||||||
let
|
let
|
||||||
checkFlag = flag : lib.getAttr [flag] false args;
|
checkFlag = flag : lib.attrByPath [flag] false args;
|
||||||
in
|
in
|
||||||
builderDefs.passthru.function ({
|
builderDefs.passthru.function ({
|
||||||
inherit src;
|
inherit src;
|
||||||
|
@ -18,7 +18,7 @@ args : with args;
|
||||||
(fullDepEntry
|
(fullDepEntry
|
||||||
args.Install
|
args.Install
|
||||||
(["doMake"]
|
(["doMake"]
|
||||||
++ (lib.getAttr ["extraInstallDeps"] [] args))
|
++ (lib.attrByPath ["extraInstallDeps"] [] args))
|
||||||
)
|
)
|
||||||
else fullDepEntry "" ["doMakeInstall"];
|
else fullDepEntry "" ["doMakeInstall"];
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ stdenv.mkDerivation {
|
||||||
let gcc_ = if gcc != null then gcc else {}; in
|
let gcc_ = if gcc != null then gcc else {}; in
|
||||||
(if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) //
|
(if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) //
|
||||||
{ description =
|
{ description =
|
||||||
stdenv.lib.getAttr ["meta" "description"] "System C compiler" gcc_
|
stdenv.lib.attrByPath ["meta" "description"] "System C compiler" gcc_
|
||||||
+ " (wrapper script)";
|
+ " (wrapper script)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
let version = lib.getAttr ["version"] "2.04" args; in
|
let version = lib.attrByPath ["version"] "2.04" args; in
|
||||||
rec {
|
rec {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.users.bigpond.net.au/gavindi/ttf-arkpandora-${version}.tgz";
|
url = "http://www.users.bigpond.net.au/gavindi/ttf-arkpandora-${version}.tgz";
|
||||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec{
|
||||||
--with-pythondir=${python}
|
--with-pythondir=${python}
|
||||||
";
|
";
|
||||||
|
|
||||||
#xlibs2 = map (attrName: builtins.getAttr attrName xlibs) (builtins.attrNames xlibs);
|
#xlibs2 attrByPath (attrName: builtins.getAttr attrName xlibs) (builtins.attrNames xlibs);
|
||||||
#x_libraries_env = concatStringsSep ":" (map (p: "${p}/lib") xlibs2);
|
#x_libraries_env = concatStringsSep ":" (map (p: "${p}/lib") xlibs2);
|
||||||
|
|
||||||
x_libraries_env = concatStringsSep ":" (map (p: "${p}/lib") xlibs);
|
x_libraries_env = concatStringsSep ":" (map (p: "${p}/lib") xlibs);
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
doPatchShebangs = args.doPatchShebangs;
|
doPatchShebangs = args.doPatchShebangs;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "2008.03.30" args;
|
version = lib.attrByPath ["version"] "2008.03.30" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
zlib sqlite gmp libffi cairo ncurses freetype mesa
|
zlib sqlite gmp libffi cairo ncurses freetype mesa
|
||||||
libpng libtiff libjpeg readline libsndfile libxml2
|
libpng libtiff libjpeg readline libsndfile libxml2
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args: with args;
|
args: with args;
|
||||||
let version = lib.getAttr ["version"] "4.0.1" args; in
|
let version = lib.attrByPath ["version"] "4.0.1" args; in
|
||||||
rec {
|
rec {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://infogroep.be/pub/plt/bundles/${version}/plt/plt-${version}-src-unix.tgz";
|
url = "ftp://infogroep.be/pub/plt/bundles/${version}/plt/plt-${version}-src-unix.tgz";
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "1.8.1" a;
|
version = a.lib.attrByPath ["version"] "1.8.1" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
perl
|
perl
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "4.1.0" args;
|
version = lib.attrByPath ["version"] "4.1.0" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
cmake freeglut mesa
|
cmake freeglut mesa
|
||||||
libX11 xproto inputproto libXi libXmu
|
libX11 xproto inputproto libXi libXmu
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
simplyShare = args.simplyShare;
|
simplyShare = args.simplyShare;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "2.0.0" args;
|
version = lib.attrByPath ["version"] "2.0.0" args;
|
||||||
buildInputs = with args; [ ];
|
buildInputs = with args; [ ];
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "" args;
|
version = lib.attrByPath ["version"] "" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
libtiff libpng libjpeg pkgconfig
|
libtiff libpng libjpeg pkgconfig
|
||||||
gtk glib
|
gtk glib
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
lib = args.lib;
|
lib = args.lib;
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.9.1" args;
|
version = lib.attrByPath ["version"] "0.9.1" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
libtool libjpeg openssl libX11 libXdamage xproto damageproto
|
libtool libjpeg openssl libX11 libXdamage xproto damageproto
|
||||||
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
|
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
lib = args.lib;
|
lib = args.lib;
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.10.1" args;
|
version = lib.attrByPath ["version"] "0.10.1" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
let version = lib.getAttr ["version"] "r34824" args; in
|
let version = lib.attrByPath ["version"] "r34824" args; in
|
||||||
rec {
|
rec {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://nightly.webkit.org/files/trunk/src/WebKit-${version}.tar.bz2";
|
url = "http://nightly.webkit.org/files/trunk/src/WebKit-${version}.tar.bz2";
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.83.0" a;
|
version = a.lib.attrByPath ["version"] "0.83.0" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
pkgconfig
|
pkgconfig
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.4.8" a;
|
version = a.lib.attrByPath ["version"] "0.4.8" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
python
|
python
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.1.9" a;
|
version = a.lib.attrByPath ["version"] "0.1.9" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
pkgconfig pygtk
|
pkgconfig pygtk
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.8" a;
|
version = a.lib.attrByPath ["version"] "0.8" a;
|
||||||
propagatedBuildInputs = with a; [
|
propagatedBuildInputs = with a; [
|
||||||
openssl python
|
openssl python
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.5.0rc1" a;
|
version = a.lib.attrByPath ["version"] "0.5.0rc1" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
python setuptools
|
python setuptools
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.5" a;
|
version = a.lib.attrByPath ["version"] "0.5" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
python pil makeWrapper
|
python pil makeWrapper
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.5beta" a;
|
version = a.lib.attrByPath ["version"] "0.5beta" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
mesa libX11 xproto tcl freeglut
|
mesa libX11 xproto tcl freeglut
|
||||||
SDL SDL_mixer libXi inputproto
|
SDL SDL_mixer libXi inputproto
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "5.07" a;
|
version = a.lib.attrByPath ["version"] "5.07" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
flex
|
flex
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
let
|
let
|
||||||
version = lib.getAttr ["version"] "1.12.1" args;
|
version = lib.attrByPath ["version"] "1.12.1" args;
|
||||||
sha256 = lib.getAttr ["sha256"]
|
sha256 = lib.attrByPath ["sha256"]
|
||||||
"0xmrp7vkkp1hfblb6nl3rh2651qsbcm21bnncpnma1sf40jaf8wj" args;
|
"0xmrp7vkkp1hfblb6nl3rh2651qsbcm21bnncpnma1sf40jaf8wj" args;
|
||||||
pkgName = "lincity";
|
pkgName = "lincity";
|
||||||
in
|
in
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "3.4.3" a;
|
version = a.lib.attrByPath ["version"] "3.4.3" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
ncurses flex bison
|
ncurses flex bison
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "r8541" a;
|
version = a.lib.attrByPath ["version"] "r8541" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
gtk glib pkgconfig libX11
|
gtk glib pkgconfig libX11
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.61" a;
|
version = a.lib.attrByPath ["version"] "0.61" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
mesa libX11 xproto tcl freeglut
|
mesa libX11 xproto tcl freeglut
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "4.2.7" a;
|
version = a.lib.attrByPath ["version"] "4.2.7" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
libX11 xproto libXt libXaw libSM libICE libXmu
|
libX11 xproto libXt libXaw libSM libICE libXmu
|
||||||
libXext gnuchess
|
libXext gnuchess
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
lib = args.lib;
|
lib = args.lib;
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.5.1" args;
|
version = lib.attrByPath ["version"] "0.5.1" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
chipmunk sqlite curl zlib bzip2 libjpeg libpng
|
chipmunk sqlite curl zlib bzip2 libjpeg libpng
|
||||||
freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf
|
freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "3.3c" a;
|
version = a.lib.attrByPath ["version"] "3.3c" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
a.libX11 a.xproto a.libXpm a.libXt
|
a.libX11 a.xproto a.libXpm a.libXt
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "2.7.3" a;
|
version = a.lib.attrByPath ["version"] "2.7.3" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
ncurses flex bison autoconf automake m4
|
ncurses flex bison autoconf automake m4
|
||||||
];
|
];
|
||||||
|
|
|
@ -12,21 +12,24 @@ rec {
|
||||||
|
|
||||||
/* Return an attribute from nested attribute sets. For instance
|
/* Return an attribute from nested attribute sets. For instance
|
||||||
["x" "y"] applied to some set e returns e.x.y, if it exists. The
|
["x" "y"] applied to some set e returns e.x.y, if it exists. The
|
||||||
default value is returned otherwise. !!! there is also
|
default value is returned otherwise. */
|
||||||
builtins.getAttr (is there a better name for this function?)
|
attrByPath = attrPath: default: e:
|
||||||
*/
|
|
||||||
getAttr = attrPath: default: e:
|
|
||||||
let attr = head attrPath;
|
let attr = head attrPath;
|
||||||
in
|
in
|
||||||
if attrPath == [] then e
|
if attrPath == [] then e
|
||||||
else if builtins ? hasAttr && hasAttr attr e
|
else if builtins ? hasAttr && hasAttr attr e
|
||||||
then getAttr (tail attrPath) default (builtins.getAttr attr e)
|
then attrByPath (tail attrPath) default (builtins.getAttr attr e)
|
||||||
else default;
|
else default;
|
||||||
|
|
||||||
|
# keep compatibility for some time. will be removed soon (the name getAttr
|
||||||
|
# should only be used for the builtins primop)
|
||||||
|
getAttr = a : b : c : builtins.trace "depreceated usage of lib.getAttr!"
|
||||||
|
(attrByPath a b c);
|
||||||
|
|
||||||
|
|
||||||
getAttrFromPath = attrPath: set:
|
getAttrFromPath = attrPath: set:
|
||||||
let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
|
let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
|
||||||
in getAttr attrPath (abort errorMsg) set;
|
in attrByPath attrPath (abort errorMsg) set;
|
||||||
|
|
||||||
|
|
||||||
/* Return the specified attributes from a set.
|
/* Return the specified attributes from a set.
|
||||||
|
|
|
@ -111,7 +111,7 @@ rec {
|
||||||
pairMap = innerPairMap [];
|
pairMap = innerPairMap [];
|
||||||
|
|
||||||
|
|
||||||
# shortcut for getAttr ["name"] default attrs
|
# shortcut for attrByPath ["name"] default attrs
|
||||||
maybeAttr = name: default: attrs:
|
maybeAttr = name: default: attrs:
|
||||||
if (__hasAttr name attrs) then (__getAttr name attrs) else default;
|
if (__hasAttr name attrs) then (__getAttr name attrs) else default;
|
||||||
|
|
||||||
|
@ -131,14 +131,14 @@ rec {
|
||||||
checkFlag = attrSet: name:
|
checkFlag = attrSet: name:
|
||||||
if (name == "true") then true else
|
if (name == "true") then true else
|
||||||
if (name == "false") then false else
|
if (name == "false") then false else
|
||||||
if (elem name (getAttr ["flags"] [] attrSet)) then true else
|
if (elem name (attrByPath ["flags"] [] attrSet)) then true else
|
||||||
getAttr [name] false attrSet ;
|
attrByPath [name] false attrSet ;
|
||||||
|
|
||||||
|
|
||||||
# Input : attrSet, [ [name default] ... ], name
|
# Input : attrSet, [ [name default] ... ], name
|
||||||
# Output : its value or default.
|
# Output : its value or default.
|
||||||
getValue = attrSet: argList: name:
|
getValue = attrSet: argList: name:
|
||||||
( getAttr [name] (if checkFlag attrSet name then true else
|
( attrByPath [name] (if checkFlag attrSet name then true else
|
||||||
if argList == [] then null else
|
if argList == [] then null else
|
||||||
let x = builtins.head argList; in
|
let x = builtins.head argList; in
|
||||||
if (head x) == name then
|
if (head x) == name then
|
||||||
|
|
|
@ -193,7 +193,7 @@ rec {
|
||||||
cfg3 = noImportConditions cfg2;
|
cfg3 = noImportConditions cfg2;
|
||||||
in cfg3;
|
in cfg3;
|
||||||
|
|
||||||
getRequire = x: toList (getAttr ["require"] [] (preprocess x));
|
getRequire = x: toList (attrByPath ["require"] [] (preprocess x));
|
||||||
getRecusiveRequire = x:
|
getRecusiveRequire = x:
|
||||||
fold (cfg: l:
|
fold (cfg: l:
|
||||||
if isPath cfg then
|
if isPath cfg then
|
||||||
|
@ -221,7 +221,7 @@ rec {
|
||||||
lib.fix (fixOptionSetsFun merge pkgs opts);
|
lib.fix (fixOptionSetsFun merge pkgs opts);
|
||||||
|
|
||||||
optionAttrSetToDocList = l: attrs:
|
optionAttrSetToDocList = l: attrs:
|
||||||
if (getAttr ["_type"] "" attrs) == "option" then
|
if (attrByPath ["_type"] "" attrs) == "option" then
|
||||||
[({
|
[({
|
||||||
#inherit (attrs) description;
|
#inherit (attrs) description;
|
||||||
description = if attrs ? description then attrs.description else
|
description = if attrs ? description then attrs.description else
|
||||||
|
@ -582,4 +582,4 @@ rec {
|
||||||
mkNotdef
|
mkNotdef
|
||||||
) prioValList;
|
) prioValList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure localDefs
|
(textClosure localDefs
|
||||||
((lib.optional
|
((lib.optional
|
||||||
(lib.getAttr ["freshHAL"] false args)
|
(lib.attrByPath ["freshHAL"] false args)
|
||||||
preBuild)
|
preBuild)
|
||||||
++ [doMakeInstall postInstall
|
++ [doMakeInstall postInstall
|
||||||
doForceShare doPropagate]));
|
doForceShare doPropagate]));
|
||||||
|
|
|
@ -29,12 +29,12 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "atheros-"+version;
|
name = "atheros-"+version;
|
||||||
patches = lib.optional
|
patches = lib.optional
|
||||||
(lib.getAttr ["injectionPatch"] false args)
|
(lib.attrByPath ["injectionPatch"] false args)
|
||||||
injectionPatchFile;
|
injectionPatchFile;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure localDefs
|
(textClosure localDefs
|
||||||
((lib.optional
|
((lib.optional
|
||||||
(lib.getAttr ["freshHAL"] false args)
|
(lib.attrByPath ["freshHAL"] false args)
|
||||||
preBuild)
|
preBuild)
|
||||||
++ [doPatch doMakeInstall postInstall
|
++ [doPatch doMakeInstall postInstall
|
||||||
doForceShare doPropagate]));
|
doForceShare doPropagate]));
|
||||||
|
|
|
@ -29,12 +29,12 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "atheros-"+version;
|
name = "atheros-"+version;
|
||||||
patches = lib.optional
|
patches = lib.optional
|
||||||
(lib.getAttr ["injectionPatch"] false args)
|
(lib.attrByPath ["injectionPatch"] false args)
|
||||||
injectionPatchFile;
|
injectionPatchFile;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure localDefs
|
(textClosure localDefs
|
||||||
((lib.optional
|
((lib.optional
|
||||||
(lib.getAttr ["freshHAL"] false args)
|
(lib.attrByPath ["freshHAL"] false args)
|
||||||
preBuild)
|
preBuild)
|
||||||
++ [doPatch doMakeInstall postInstall
|
++ [doPatch doMakeInstall postInstall
|
||||||
doForceShare doPropagate]));
|
doForceShare doPropagate]));
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.18" a;
|
version = a.lib.attrByPath ["version"] "0.18" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
zlib e2fsprogs acl
|
zlib e2fsprogs acl
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "1.2" a;
|
version = a.lib.attrByPath ["version"] "1.2" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
gpm fontconfig freetype pkgconfig
|
gpm fontconfig freetype pkgconfig
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.7.47" args;
|
version = lib.attrByPath ["version"] "0.7.47" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
openssl zlib pcre libxml2 libxslt
|
openssl zlib pcre libxml2 libxslt
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.4" a;
|
version = a.lib.attrByPath ["version"] "0.4" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
xmpppy pythonIRClib python makeWrapper
|
xmpppy pythonIRClib python makeWrapper
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
lib=args.lib;
|
lib=args.lib;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "3.01" args;
|
version = lib.attrByPath ["version"] "3.01" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
libX11 xproto libXext xextproto libXtst gtk
|
libX11 xproto libXext xextproto libXtst gtk
|
||||||
libXi inputproto pkgconfig recordproto
|
libXi inputproto pkgconfig recordproto
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "0.6" a;
|
version = a.lib.attrByPath ["version"] "0.6" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
cmake imagemagick patchelf
|
cmake imagemagick patchelf
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
lib = args.lib;
|
lib = args.lib;
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.7.0" args;
|
version = lib.attrByPath ["version"] "0.7.0" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
libpng libtiff libjpeg librsvg imagemagick pkgconfig
|
libpng libtiff libjpeg librsvg imagemagick pkgconfig
|
||||||
zlib libX11 bzip2 libtool
|
zlib libX11 bzip2 libtool
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "0.9.3" args;
|
version = lib.attrByPath ["version"] "0.9.3" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
libpng libcv
|
libpng libcv
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
lib = args.lib;
|
lib = args.lib;
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "3.0.3" args;
|
version = lib.attrByPath ["version"] "3.0.3" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
libpng pkgconfig
|
libpng pkgconfig
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "2.4.4" a;
|
version = a.lib.attrByPath ["version"] "2.4.4" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@ a :
|
||||||
let
|
let
|
||||||
fetchurl = a.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = a.lib.getAttr ["version"] "3.10" a;
|
version = a.lib.attrByPath ["version"] "3.10" a;
|
||||||
buildInputs = with a; [
|
buildInputs = with a; [
|
||||||
ppp
|
ppp
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = args.fetchurl;
|
||||||
fullDepEntry = args.fullDepEntry;
|
fullDepEntry = args.fullDepEntry;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "" args;
|
version = lib.attrByPath ["version"] "" args;
|
||||||
buildInputs = with args; [
|
buildInputs = with args; [
|
||||||
unzip
|
unzip
|
||||||
];
|
];
|
||||||
|
|
|
@ -66,7 +66,7 @@ let
|
||||||
|
|
||||||
# Return an attribute from the Nixpkgs configuration file, or
|
# Return an attribute from the Nixpkgs configuration file, or
|
||||||
# a default value if the attribute doesn't exist.
|
# a default value if the attribute doesn't exist.
|
||||||
getConfig = attrPath: default: lib.getAttr attrPath default config;
|
getConfig = attrPath: default: lib.attrByPath attrPath default config;
|
||||||
|
|
||||||
|
|
||||||
# Allow packages to be overriden globally via the `packageOverrides'
|
# Allow packages to be overriden globally via the `packageOverrides'
|
||||||
|
@ -5987,12 +5987,23 @@ let
|
||||||
inherit fetchurl stdenv jdk;
|
inherit fetchurl stdenv jdk;
|
||||||
inherit (gtkLibs) gtk glib;
|
inherit (gtkLibs) gtk glib;
|
||||||
inherit (xlibs) libXtst;
|
inherit (xlibs) libXtst;
|
||||||
inherit plugins;
|
inherit plugins makeOverridable unzip;
|
||||||
};
|
};
|
||||||
|
|
||||||
eclipsesdk = eclipse [];
|
eclipsesdk = eclipse [];
|
||||||
|
|
||||||
eclipseSpoofax = lowPrio (appendToName "with-spoofax" (eclipse [spoofax]));
|
eclipseSpoofax = lowPrio (appendToName "with-spoofax" (eclipse [eclipsePlugins.spoofax]));
|
||||||
|
eclipseCDT = import ../applications/editors/eclipse/eclipse-cdt.nix {
|
||||||
|
inherit fetchurl stdenv eclipse;
|
||||||
|
};
|
||||||
|
# quinox p2 installer
|
||||||
|
eclipseMinimal = import ../applications/editors/eclipse/eclipse-p2-installer.nix {
|
||||||
|
inherit fetchurl stdenv eclipse;
|
||||||
|
};
|
||||||
|
|
||||||
|
eclipsePlugins = import ../applications/editors/eclipse/plugins.nix {
|
||||||
|
inherit fetchurl stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
ed = import ../applications/editors/ed {
|
ed = import ../applications/editors/ed {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
|
@ -6300,7 +6311,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
hugin = import ../applications/graphics/hugin {
|
hugin = import ../applications/graphics/hugin {
|
||||||
inherit stdenv fetchurl cmake panotools libtiff libpng boost pkgconfig exiv2 gettext ilmbase;
|
inherit stdenv fetchurl cmake panotools libtiff libpng boost pkgconfig
|
||||||
|
exiv2 gettext ilmbase enblendenfuse autopanosiftc;
|
||||||
wxGTK = wxGTK28;
|
wxGTK = wxGTK28;
|
||||||
openexr = openexr_1_6_1;
|
openexr = openexr_1_6_1;
|
||||||
};
|
};
|
||||||
|
@ -6774,11 +6786,6 @@ let
|
||||||
# That's why I'v added ffmpeg_svn
|
# That's why I'v added ffmpeg_svn
|
||||||
};
|
};
|
||||||
|
|
||||||
spoofax = import ../applications/editors/eclipse/plugins/spoofax {
|
|
||||||
inherit fetchurl stdenv;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
stumpwm = builderDefsPackage (import ../applications/window-managers/stumpwm) {
|
stumpwm = builderDefsPackage (import ../applications/window-managers/stumpwm) {
|
||||||
inherit clisp texinfo;
|
inherit clisp texinfo;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue