From f7f938a1d15277fa11a2cbf75fe9c7d4344f25c3 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Sun, 24 May 2009 10:57:41 +0000 Subject: [PATCH] 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 --- pkgs/applications/audio/snd/default.nix | 2 +- pkgs/applications/editors/eclipse/default.nix | 34 ++++++---- .../eclipse/plugins/spoofax/default.nix | 6 -- pkgs/applications/graphics/hugin/default.nix | 7 +- pkgs/applications/graphics/xaos/default.nix | 2 +- .../graphics/xscreensaver/default.nix | 2 +- .../networking/browsers/midori/default.nix | 2 +- .../mozilla-plugins/mozplugger/default.nix | 2 +- .../instant-messengers/carrier/2.4.2.nix | 2 +- .../instant-messengers/carrier/2.5.0.nix | 2 +- .../instant-messengers/gajim/default.nix | 2 +- .../science/geometry/drgeo/default.nix | 2 +- .../virtualization/xen/default.nix | 2 +- .../window-managers/stumpwm/default.nix | 2 +- .../builder-defs/builder-defs.nix | 68 +++++++++---------- .../template-composing-builder.nix | 2 +- pkgs/build-support/checker/default.nix | 4 +- pkgs/build-support/deb-package/default.nix | 4 +- pkgs/build-support/gcc-wrapper/default.nix | 2 +- pkgs/data/fonts/arkpandora/default.nix | 2 +- pkgs/desktops/superkaramba/default.nix | 2 +- pkgs/development/interpreters/io/default.nix | 2 +- .../interpreters/plt-scheme/default.nix | 2 +- pkgs/development/libraries/botan/default.nix | 2 +- .../libraries/chipmunk/default.nix | 2 +- .../libraries/cl-ppcre/default.nix | 2 +- pkgs/development/libraries/libcv/default.nix | 2 +- .../libraries/libvncserver/default.nix | 2 +- pkgs/development/libraries/ode/default.nix | 2 +- pkgs/development/libraries/webkit/default.nix | 2 +- .../python-modules/dbus/default.nix | 2 +- .../python-modules/irclib/default.nix | 2 +- .../python-modules/libsexy/default.nix | 2 +- .../python-modules/pyopenssl/default.nix | 2 +- .../python-modules/xmpppy/default.nix | 2 +- .../tools/documentation/docutils/default.nix | 2 +- pkgs/games/extremetuxracer/default.nix | 2 +- pkgs/games/gnuchess/default.nix | 2 +- pkgs/games/lincity/default.nix | 4 +- pkgs/games/nethack/default.nix | 2 +- pkgs/games/sgt-puzzles/default.nix | 2 +- pkgs/games/tuxracer/default.nix | 2 +- pkgs/games/xboard/default.nix | 2 +- pkgs/games/xmoto/default.nix | 2 +- pkgs/games/xsokoban/default.nix | 2 +- pkgs/games/zangband/default.nix | 2 +- pkgs/lib/attrsets.nix | 15 ++-- pkgs/lib/misc.nix | 8 +-- pkgs/lib/options.nix | 6 +- pkgs/os-specific/linux/atheros/r3693.nix | 2 +- pkgs/os-specific/linux/atheros/r3837.nix | 4 +- pkgs/os-specific/linux/atheros/r3867.nix | 4 +- pkgs/os-specific/linux/btrfsprogs/default.nix | 2 +- pkgs/os-specific/linux/fbterm/default.nix | 2 +- pkgs/servers/http/nginx/default.nix | 2 +- pkgs/servers/xmpp/pyIRCt/default.nix | 2 +- pkgs/tools/X11/xnee/default.nix | 2 +- pkgs/tools/graphics/cuneiform/default.nix | 2 +- pkgs/tools/graphics/dmtx/default.nix | 2 +- pkgs/tools/graphics/qrdecode/default.nix | 2 +- pkgs/tools/graphics/qrencode/default.nix | 2 +- pkgs/tools/networking/ppp/default.nix | 2 +- pkgs/tools/networking/rp-pppoe/default.nix | 2 +- pkgs/tools/security/bmrsa/11.nix | 2 +- pkgs/top-level/all-packages.nix | 25 ++++--- 65 files changed, 153 insertions(+), 140 deletions(-) delete mode 100644 pkgs/applications/editors/eclipse/plugins/spoofax/default.nix diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix index 5cab85b993c..8d937afeec7 100644 --- a/pkgs/applications/audio/snd/default.nix +++ b/pkgs/applications/audio/snd/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "9.4" args; + version = lib.attrByPath ["version"] "9.4" args; buildInputs = with args; [gtk glib pkgconfig libXpm gmp gettext libX11 fftw] ++ (lib.optional (args ? ruby) args.ruby) diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index 1cbfff91986..97b582075c4 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -9,25 +9,29 @@ # 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 { - body = +let eclipseFun = + makeOverridable ({name, bindist} : stdenv.mkDerivation { - name = "eclipse-sdk-3.5M6"; + inherit name; builder = ./builder.sh; src = bindist; - buildInputs = []; + buildInputs = [ unzip /* unzip required by eclipseCDT */ ]; inherit jdk plugins; libraries = [gtk glib libXtst]; - }; + }); in - bindist = - if (stdenv.system == "x86_64-linux") then fetchurl { - 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"; - }; -} + eclipseFun { + # you can override these settings usnig .override {...} + name = "eclipse-sdk-3.5M6"; + + bindist = + if (stdenv.system == "x86_64-linux") then fetchurl { + 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"; + }; + } diff --git a/pkgs/applications/editors/eclipse/plugins/spoofax/default.nix b/pkgs/applications/editors/eclipse/plugins/spoofax/default.nix deleted file mode 100644 index 649619e487e..00000000000 --- a/pkgs/applications/editors/eclipse/plugins/spoofax/default.nix +++ /dev/null @@ -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"; -} diff --git a/pkgs/applications/graphics/hugin/default.nix b/pkgs/applications/graphics/hugin/default.nix index 9f74f1702fc..c0ce7f15c90 100644 --- a/pkgs/applications/graphics/hugin/default.nix +++ b/pkgs/applications/graphics/hugin/default.nix @@ -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 { name = "hugin-0.7.0"; @@ -35,6 +36,10 @@ stdenv.mkDerivation { eval -- "cmake .. $cmakeFlags" set +x ''; + postInstall = '' + ensureDir $out/nix-support + echo ${enblendenfuse} ${autopanosiftc} > $out/nix-support/$out/nix-support/propagated-user-env-packages + ''; meta = { homepage = http://hugin.sourceforge.net/; diff --git a/pkgs/applications/graphics/xaos/default.nix b/pkgs/applications/graphics/xaos/default.nix index 226dcb8d918..adf64cdb0d3 100644 --- a/pkgs/applications/graphics/xaos/default.nix +++ b/pkgs/applications/graphics/xaos/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "3.4" a; + version = a.lib.attrByPath ["version"] "3.4" a; buildInputs = with a; [ aalib gsl libpng libX11 xproto libXext xextproto libXt zlib gettext intltool perl diff --git a/pkgs/applications/graphics/xscreensaver/default.nix b/pkgs/applications/graphics/xscreensaver/default.nix index fb09838d260..3c335994a76 100644 --- a/pkgs/applications/graphics/xscreensaver/default.nix +++ b/pkgs/applications/graphics/xscreensaver/default.nix @@ -1,5 +1,5 @@ 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 */ fetchurl { url = "http://www.jwz.org/xscreensaver/xscreensaver-${version}.tar.gz"; diff --git a/pkgs/applications/networking/browsers/midori/default.nix b/pkgs/applications/networking/browsers/midori/default.nix index fd2b90805f5..24ba853f058 100644 --- a/pkgs/applications/networking/browsers/midori/default.nix +++ b/pkgs/applications/networking/browsers/midori/default.nix @@ -5,7 +5,7 @@ let doPatchShebangs = args.doPatchShebangs; makeManyWrappers = args.makeManyWrappers; - version = lib.getAttr ["version"] "0.0.21" args; + version = lib.attrByPath ["version"] "0.0.21" args; buildInputs = with args; [ intltool python imagemagick gtk glib webkit libxml2 gtksourceview pkgconfig which gettext makeWrapper diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix index ee8ff18bd5d..890021b33d6 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "1.12.0" a; + version = a.lib.attrByPath ["version"] "1.12.0" a; buildInputs = with a; [ firefox libX11 xproto ]; diff --git a/pkgs/applications/networking/instant-messengers/carrier/2.4.2.nix b/pkgs/applications/networking/instant-messengers/carrier/2.4.2.nix index b6d8c7feecb..7728f7abcfc 100644 --- a/pkgs/applications/networking/instant-messengers/carrier/2.4.2.nix +++ b/pkgs/applications/networking/instant-messengers/carrier/2.4.2.nix @@ -5,7 +5,7 @@ args : with args; (to use a fresher pidgin build) */ let - externalPurple2 = (lib.getAttr ["purple2Source"] null args) != null; + externalPurple2 = lib.attrByPath ["purple2Source"] null args) != null; in rec { src = fetchurl { diff --git a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix index 848045d4a24..257d3d09f71 100644 --- a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix +++ b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix @@ -5,7 +5,7 @@ args : with args; (to use a fresher pidgin build) */ let - externalPurple2 = (lib.getAttr ["purple2Source"] null args) != null; + externalPurple2 = (lib.attrByPath ["purple2Source"] null args) != null; in rec { src = fetchurl { diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix index b8263ff0b15..f5b1d344574 100644 --- a/pkgs/applications/networking/instant-messengers/gajim/default.nix +++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.12.1" a; + version = a.lib.attrByPath ["version"] "0.12.1" a; buildInputs = with a; [ python pyGtkGlade gtk perl intltool dbus gettext pkgconfig makeWrapper libglade pyopenssl libXScrnSaver diff --git a/pkgs/applications/science/geometry/drgeo/default.nix b/pkgs/applications/science/geometry/drgeo/default.nix index 8f0bcd08654..ff52d366765 100644 --- a/pkgs/applications/science/geometry/drgeo/default.nix +++ b/pkgs/applications/science/geometry/drgeo/default.nix @@ -1,5 +1,5 @@ args : with args; -let version = lib.getAttr ["version"] "1.1.0" args; in +let version = lib.attrByPath ["version"] "1.1.0" args; in rec { src = fetchurl { url = http://downloads.sourceforge.net/ofset/drgeo-1.1.0.tar.gz; diff --git a/pkgs/applications/virtualization/xen/default.nix b/pkgs/applications/virtualization/xen/default.nix index b039412499d..46625436798 100644 --- a/pkgs/applications/virtualization/xen/default.nix +++ b/pkgs/applications/virtualization/xen/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "3.3.0" args; + version = lib.attrByPath ["version"] "3.3.0" args; _buildInputs = with args; [ python e2fsprogs gnutls pkgconfig libjpeg ncurses SDL libvncserver zlib graphviz ghostscript diff --git a/pkgs/applications/window-managers/stumpwm/default.nix b/pkgs/applications/window-managers/stumpwm/default.nix index 6bf0955354a..12d0acb367a 100644 --- a/pkgs/applications/window-managers/stumpwm/default.nix +++ b/pkgs/applications/window-managers/stumpwm/default.nix @@ -6,7 +6,7 @@ let fullDepEntry = args.fullDepEntry; 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"; in diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index b7d5130a44a..2956fa478bf 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -3,14 +3,14 @@ args: with args; with stringsWithDeps; with lib; { 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"]; forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL" "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); @@ -234,7 +234,7 @@ args: with args; with stringsWithDeps; with lib; (if args ? goSrcDir then args.goSrcDir else "") ) ["minInit"]; - configureCommand = getAttr ["configureCommand"] "./configure" args; + configureCommand = attrByPath ["configureCommand"] "./configure" args; doConfigure = fullDepEntry (" ${configureCommand} --prefix=\"\$prefix\" ${toString configureFlags} @@ -276,8 +276,8 @@ args: with args; with stringsWithDeps; with lib; '') ["minInit" "addInputs" "doUnpack"]; doMakeInstall = fullDepEntry (" - make ${toString (getAttr ["makeFlags"] "" args)} "+ - "${toString (getAttr ["installFlags"] "" args)} install") ["doMake"]; + make ${toString (attrByPath ["makeFlags"] "" args)} "+ + "${toString (attrByPath ["installFlags"] "" args)} install") ["doMake"]; doForceShare = fullDepEntry (" ensureDir \"\$prefix/share\" @@ -302,7 +302,7 @@ args: with args; with stringsWithDeps; with lib; patchFlags = if args ? patchFlags then args.patchFlags else "-p1"; - patches = getAttr ["patches"] [] args; + patches = attrByPath ["patches"] [] args; toPatchCommand = s: "cat ${s} | patch ${toString patchFlags}"; @@ -326,7 +326,7 @@ 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 (attrByPath ["wrappedEnv"] [] args)) ["minInit"]; makeManyWrappers = wildcard : wrapperFlags : fullDepEntry ('' for i in ${wildcard}; do @@ -347,7 +347,7 @@ args: with args; with stringsWithDeps; with lib; doPropagate = fullDepEntry (" 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"]; /*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}"; replaceInScript = file: l: concatStringsSep "\n" ((pairMap (replaceScriptVar file) 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"; textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps); inherit noDepEntry fullDepEntry packEntry; - defList = getAttr ["defList"] [] args; + defList = attrByPath ["defList"] [] args; getVal = getValue args defList; check = checkFlag args; - reqsList = getAttr ["reqsList"] [] args; + reqsList = attrByPath ["reqsList"] [] args; buildInputsNames = filter (x: null != getVal x) (uniqList {inputList = (concatLists (map (x: if x==[] then [] else builtins.tail x) reqsList));}); - configFlags = getAttr ["configFlags"] [] args; - buildFlags = getAttr ["buildFlags"] [] args; - nameSuffixes = getAttr ["nameSuffixes"] [] args; + configFlags = attrByPath ["configFlags"] [] args; + buildFlags = attrByPath ["buildFlags"] [] args; + nameSuffixes = attrByPath ["nameSuffixes"] [] args; autoBuildInputs = assert (checkReqs args defList reqsList); filter (x: x!=null) (map getVal buildInputsNames); autoConfigureFlags = condConcat "" configFlags check; autoMakeFlags = condConcat "" buildFlags check; - useConfig = getAttr ["useConfig"] false args; + useConfig = attrByPath ["useConfig"] false args; realBuildInputs = lib.closePropagation ((if useConfig then autoBuildInputs else - getAttr ["buildInputs"] [] args)++ - (getAttr ["propagatedBuildInputs"] [] args)); + attrByPath ["buildInputs"] [] args)++ + (attrByPath ["propagatedBuildInputs"] [] args)); configureFlags = if useConfig then autoConfigureFlags else - getAttr ["configureFlags"] "" args; - makeFlags = if useConfig then autoMakeFlags else getAttr ["makeFlags"] "" args; + attrByPath ["configureFlags"] "" args; + makeFlags = if useConfig then autoMakeFlags else attrByPath ["makeFlags"] "" args; inherit lib; @@ -394,7 +394,7 @@ args: with args; with stringsWithDeps; with lib; x.text + "\n" + after ;}; createDirs = fullDepEntry (concatStringsSep ";" - (map (x: "ensureDir ${x}") (getAttr ["neededDirs"] [] args)) + (map (x: "ensureDir ${x}") (attrByPath ["neededDirs"] [] args)) ) ["minInit" "defEnsureDir"]; copyExtraDoc = fullDepEntry ('' @@ -404,20 +404,20 @@ args: with args; with stringsWithDeps; with lib; '' + (concatStringsSep ";" (map (x: ''cp "${x}" "$out/share/doc/$name" || true;'') - (getAttr ["extraDoc"] [] args)))) ["minInit" "defEnsureDir" "doUnpack"]; + (attrByPath ["extraDoc"] [] args)))) ["minInit" "defEnsureDir" "doUnpack"]; realPhaseNames = - (optional ([] != getAttr ["neededDirs"] [] args) "createDirs") + (optional ([] != attrByPath ["neededDirs"] [] args) "createDirs") ++ args.phaseNames ++ ["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 " @@ -429,7 +429,7 @@ args: with args; with stringsWithDeps; with lib; make check '') ["minInit"]; - extraDerivationAttrs = lib.getAttr ["extraDerivationAttrs"] {} args; + extraDerivationAttrs = lib.attrByPath ["extraDerivationAttrs"] {} args; # for overrides.. builderDefsArgs = args; @@ -459,14 +459,14 @@ args: with args; with stringsWithDeps; with lib; 'Open($1); ${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands }Reencode("unicode"); - ${optionalString (getAttr ["createTTF"] true args) ''Generate($1:r + ".ttf");''} - ${optionalString (getAttr ["createOTF"] true args) ''Generate($1:r + ".otf");''} + ${optionalString (attrByPath ["createTTF"] true args) ''Generate($1:r + ".ttf");''} + ${optionalString (attrByPath ["createOTF"] true args) ''Generate($1:r + ".otf");''} Reencode("TeX-Base-Encoding"); - ${optionalString (getAttr ["createAFM"] true args) ''Generate($1:r + ".afm");''} - ${optionalString (getAttr ["createPFM"] true args) ''Generate($1:r + ".pfm");''} - ${optionalString (getAttr ["createPFB"] true args) ''Generate($1:r + ".pfb");''} - ${optionalString (getAttr ["createMAP"] true args) ''Generate($1:r + ".map");''} - ${optionalString (getAttr ["createENC"] true args) ''Generate($1:r + ".enc");''} + ${optionalString (attrByPath ["createAFM"] true args) ''Generate($1:r + ".afm");''} + ${optionalString (attrByPath ["createPFM"] true args) ''Generate($1:r + ".pfm");''} + ${optionalString (attrByPath ["createPFB"] true args) ''Generate($1:r + ".pfb");''} + ${optionalString (attrByPath ["createMAP"] true args) ''Generate($1:r + ".map");''} + ${optionalString (attrByPath ["createENC"] true args) ''Generate($1:r + ".enc");''} ' $i; done '') ["minInit" "addInputs" "doUnpack"]; diff --git a/pkgs/build-support/builder-defs/template-composing-builder.nix b/pkgs/build-support/builder-defs/template-composing-builder.nix index 0efb347d821..988efbfadd2 100644 --- a/pkgs/build-support/builder-defs/template-composing-builder.nix +++ b/pkgs/build-support/builder-defs/template-composing-builder.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "" a; + version = a.lib.attrByPath ["version"] "" a; buildInputs = with a; [ ]; diff --git a/pkgs/build-support/checker/default.nix b/pkgs/build-support/checker/default.nix index ae25493c77c..33321907125 100644 --- a/pkgs/build-support/checker/default.nix +++ b/pkgs/build-support/checker/default.nix @@ -16,14 +16,14 @@ let checkAttrInclusion = s: a: b: ( 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 != "") ( map (x: if (x == "servicesProposal") # this attr will be checked at another place ( -> upstart-jobs/default.nix ) then "" else checkAttrInclusion (s + "." + x) (__getAttr x a) - (lib.getAttr [x] null b)) + (lib.attrByPath [x] null b)) (attrNames a)) "" ); in diff --git a/pkgs/build-support/deb-package/default.nix b/pkgs/build-support/deb-package/default.nix index 6a1ca8490ee..f227dd521a6 100644 --- a/pkgs/build-support/deb-package/default.nix +++ b/pkgs/build-support/deb-package/default.nix @@ -2,7 +2,7 @@ args : with args; let localDefs = with (builderDefs.passthru.function {src="";}); let - checkFlag = flag : lib.getAttr [flag] false args; + checkFlag = flag : lib.attrByPath [flag] false args; in builderDefs.passthru.function ({ inherit src; @@ -18,7 +18,7 @@ args : with args; (fullDepEntry args.Install (["doMake"] - ++ (lib.getAttr ["extraInstallDeps"] [] args)) + ++ (lib.attrByPath ["extraInstallDeps"] [] args)) ) else fullDepEntry "" ["doMakeInstall"]; diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 91b41706099..d517a472d74 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { let gcc_ = if gcc != null then gcc else {}; in (if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) // { description = - stdenv.lib.getAttr ["meta" "description"] "System C compiler" gcc_ + stdenv.lib.attrByPath ["meta" "description"] "System C compiler" gcc_ + " (wrapper script)"; }; diff --git a/pkgs/data/fonts/arkpandora/default.nix b/pkgs/data/fonts/arkpandora/default.nix index 02ee3346346..049bc8c911c 100644 --- a/pkgs/data/fonts/arkpandora/default.nix +++ b/pkgs/data/fonts/arkpandora/default.nix @@ -1,5 +1,5 @@ args : with args; -let version = lib.getAttr ["version"] "2.04" args; in +let version = lib.attrByPath ["version"] "2.04" args; in rec { src = fetchurl { url = "http://www.users.bigpond.net.au/gavindi/ttf-arkpandora-${version}.tgz"; diff --git a/pkgs/desktops/superkaramba/default.nix b/pkgs/desktops/superkaramba/default.nix index 0f48da9ad8f..e3d9642b4be 100644 --- a/pkgs/desktops/superkaramba/default.nix +++ b/pkgs/desktops/superkaramba/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec{ --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") xlibs); diff --git a/pkgs/development/interpreters/io/default.nix b/pkgs/development/interpreters/io/default.nix index 953d47e6b91..3277d0145f9 100644 --- a/pkgs/development/interpreters/io/default.nix +++ b/pkgs/development/interpreters/io/default.nix @@ -5,7 +5,7 @@ let fullDepEntry = args.fullDepEntry; doPatchShebangs = args.doPatchShebangs; - version = lib.getAttr ["version"] "2008.03.30" args; + version = lib.attrByPath ["version"] "2008.03.30" args; buildInputs = with args; [ zlib sqlite gmp libffi cairo ncurses freetype mesa libpng libtiff libjpeg readline libsndfile libxml2 diff --git a/pkgs/development/interpreters/plt-scheme/default.nix b/pkgs/development/interpreters/plt-scheme/default.nix index 94b59692160..79f76d6d2a8 100644 --- a/pkgs/development/interpreters/plt-scheme/default.nix +++ b/pkgs/development/interpreters/plt-scheme/default.nix @@ -1,5 +1,5 @@ args: with args; -let version = lib.getAttr ["version"] "4.0.1" args; in +let version = lib.attrByPath ["version"] "4.0.1" args; in rec { src = fetchurl { url = "ftp://infogroep.be/pub/plt/bundles/${version}/plt/plt-${version}-src-unix.tgz"; diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix index ed4cb09ebc7..10fd49b5d18 100644 --- a/pkgs/development/libraries/botan/default.nix +++ b/pkgs/development/libraries/botan/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "1.8.1" a; + version = a.lib.attrByPath ["version"] "1.8.1" a; buildInputs = with a; [ perl ]; diff --git a/pkgs/development/libraries/chipmunk/default.nix b/pkgs/development/libraries/chipmunk/default.nix index c54877946aa..f0613834364 100644 --- a/pkgs/development/libraries/chipmunk/default.nix +++ b/pkgs/development/libraries/chipmunk/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "4.1.0" args; + version = lib.attrByPath ["version"] "4.1.0" args; buildInputs = with args; [ cmake freeglut mesa libX11 xproto inputproto libXi libXmu diff --git a/pkgs/development/libraries/cl-ppcre/default.nix b/pkgs/development/libraries/cl-ppcre/default.nix index 28c7ee0475b..c17fb3f4064 100644 --- a/pkgs/development/libraries/cl-ppcre/default.nix +++ b/pkgs/development/libraries/cl-ppcre/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; simplyShare = args.simplyShare; - version = lib.getAttr ["version"] "2.0.0" args; + version = lib.attrByPath ["version"] "2.0.0" args; buildInputs = with args; [ ]; in rec { diff --git a/pkgs/development/libraries/libcv/default.nix b/pkgs/development/libraries/libcv/default.nix index 55e235e180b..a2035b4cb40 100644 --- a/pkgs/development/libraries/libcv/default.nix +++ b/pkgs/development/libraries/libcv/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "" args; + version = lib.attrByPath ["version"] "" args; buildInputs = with args; [ libtiff libpng libjpeg pkgconfig gtk glib diff --git a/pkgs/development/libraries/libvncserver/default.nix b/pkgs/development/libraries/libvncserver/default.nix index 6f3fbd2df56..755ae1dfca5 100644 --- a/pkgs/development/libraries/libvncserver/default.nix +++ b/pkgs/development/libraries/libvncserver/default.nix @@ -3,7 +3,7 @@ let lib = args.lib; fetchurl = args.fetchurl; - version = lib.getAttr ["version"] "0.9.1" args; + version = lib.attrByPath ["version"] "0.9.1" args; buildInputs = with args; [ libtool libjpeg openssl libX11 libXdamage xproto damageproto xextproto libXext fixesproto libXfixes xineramaproto libXinerama diff --git a/pkgs/development/libraries/ode/default.nix b/pkgs/development/libraries/ode/default.nix index 35264f2cdf6..2cc240c7ec3 100644 --- a/pkgs/development/libraries/ode/default.nix +++ b/pkgs/development/libraries/ode/default.nix @@ -3,7 +3,7 @@ let lib = args.lib; fetchurl = args.fetchurl; - version = lib.getAttr ["version"] "0.10.1" args; + version = lib.attrByPath ["version"] "0.10.1" args; buildInputs = with args; [ ]; diff --git a/pkgs/development/libraries/webkit/default.nix b/pkgs/development/libraries/webkit/default.nix index 07412d89ab6..687c179c3d0 100644 --- a/pkgs/development/libraries/webkit/default.nix +++ b/pkgs/development/libraries/webkit/default.nix @@ -1,5 +1,5 @@ args : with args; -let version = lib.getAttr ["version"] "r34824" args; in +let version = lib.attrByPath ["version"] "r34824" args; in rec { src = fetchurl { url = "http://nightly.webkit.org/files/trunk/src/WebKit-${version}.tar.bz2"; diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix index 167f1f471ee..fa8b88d0834 100644 --- a/pkgs/development/python-modules/dbus/default.nix +++ b/pkgs/development/python-modules/dbus/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.83.0" a; + version = a.lib.attrByPath ["version"] "0.83.0" a; buildInputs = with a; [ pkgconfig ]; diff --git a/pkgs/development/python-modules/irclib/default.nix b/pkgs/development/python-modules/irclib/default.nix index c709308b7af..c840e0a1003 100644 --- a/pkgs/development/python-modules/irclib/default.nix +++ b/pkgs/development/python-modules/irclib/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.4.8" a; + version = a.lib.attrByPath ["version"] "0.4.8" a; buildInputs = with a; [ python ]; diff --git a/pkgs/development/python-modules/libsexy/default.nix b/pkgs/development/python-modules/libsexy/default.nix index b94d6d69797..fa00a7040a0 100644 --- a/pkgs/development/python-modules/libsexy/default.nix +++ b/pkgs/development/python-modules/libsexy/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.1.9" a; + version = a.lib.attrByPath ["version"] "0.1.9" a; buildInputs = with a; [ pkgconfig pygtk ]; diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix index b2aedf7c508..86a79f1070e 100644 --- a/pkgs/development/python-modules/pyopenssl/default.nix +++ b/pkgs/development/python-modules/pyopenssl/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.8" a; + version = a.lib.attrByPath ["version"] "0.8" a; propagatedBuildInputs = with a; [ openssl python ]; diff --git a/pkgs/development/python-modules/xmpppy/default.nix b/pkgs/development/python-modules/xmpppy/default.nix index e888161ded9..3fc8058dfb2 100644 --- a/pkgs/development/python-modules/xmpppy/default.nix +++ b/pkgs/development/python-modules/xmpppy/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.5.0rc1" a; + version = a.lib.attrByPath ["version"] "0.5.0rc1" a; buildInputs = with a; [ python setuptools ]; diff --git a/pkgs/development/tools/documentation/docutils/default.nix b/pkgs/development/tools/documentation/docutils/default.nix index f032a94b153..1630b0f4072 100644 --- a/pkgs/development/tools/documentation/docutils/default.nix +++ b/pkgs/development/tools/documentation/docutils/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.5" a; + version = a.lib.attrByPath ["version"] "0.5" a; buildInputs = with a; [ python pil makeWrapper ]; diff --git a/pkgs/games/extremetuxracer/default.nix b/pkgs/games/extremetuxracer/default.nix index 6aad901d58c..db24a6d1ebf 100644 --- a/pkgs/games/extremetuxracer/default.nix +++ b/pkgs/games/extremetuxracer/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.5beta" a; + version = a.lib.attrByPath ["version"] "0.5beta" a; buildInputs = with a; [ mesa libX11 xproto tcl freeglut SDL SDL_mixer libXi inputproto diff --git a/pkgs/games/gnuchess/default.nix b/pkgs/games/gnuchess/default.nix index 0e2f6d5d68e..cbd905fc33c 100644 --- a/pkgs/games/gnuchess/default.nix +++ b/pkgs/games/gnuchess/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "5.07" a; + version = a.lib.attrByPath ["version"] "5.07" a; buildInputs = with a; [ flex ]; diff --git a/pkgs/games/lincity/default.nix b/pkgs/games/lincity/default.nix index 833db9121cf..b5c78c98b19 100644 --- a/pkgs/games/lincity/default.nix +++ b/pkgs/games/lincity/default.nix @@ -1,7 +1,7 @@ args : with args; let - version = lib.getAttr ["version"] "1.12.1" args; - sha256 = lib.getAttr ["sha256"] + version = lib.attrByPath ["version"] "1.12.1" args; + sha256 = lib.attrByPath ["sha256"] "0xmrp7vkkp1hfblb6nl3rh2651qsbcm21bnncpnma1sf40jaf8wj" args; pkgName = "lincity"; in diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index da5a8c2c736..0d68b681ba5 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "3.4.3" a; + version = a.lib.attrByPath ["version"] "3.4.3" a; buildInputs = with a; [ ncurses flex bison ]; diff --git a/pkgs/games/sgt-puzzles/default.nix b/pkgs/games/sgt-puzzles/default.nix index 21b72ae9baa..20c41ac4a74 100644 --- a/pkgs/games/sgt-puzzles/default.nix +++ b/pkgs/games/sgt-puzzles/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "r8541" a; + version = a.lib.attrByPath ["version"] "r8541" a; buildInputs = with a; [ gtk glib pkgconfig libX11 ]; diff --git a/pkgs/games/tuxracer/default.nix b/pkgs/games/tuxracer/default.nix index 8b236bf0455..98074c42d9b 100644 --- a/pkgs/games/tuxracer/default.nix +++ b/pkgs/games/tuxracer/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.61" a; + version = a.lib.attrByPath ["version"] "0.61" a; buildInputs = with a; [ mesa libX11 xproto tcl freeglut ]; diff --git a/pkgs/games/xboard/default.nix b/pkgs/games/xboard/default.nix index 8571b1b1d4e..1c116f40f30 100644 --- a/pkgs/games/xboard/default.nix +++ b/pkgs/games/xboard/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "4.2.7" a; + version = a.lib.attrByPath ["version"] "4.2.7" a; buildInputs = with a; [ libX11 xproto libXt libXaw libSM libICE libXmu libXext gnuchess diff --git a/pkgs/games/xmoto/default.nix b/pkgs/games/xmoto/default.nix index 358d577fc80..b6222c097d0 100644 --- a/pkgs/games/xmoto/default.nix +++ b/pkgs/games/xmoto/default.nix @@ -3,7 +3,7 @@ let lib = args.lib; fetchurl = args.fetchurl; - version = lib.getAttr ["version"] "0.5.1" args; + version = lib.attrByPath ["version"] "0.5.1" args; buildInputs = with args; [ chipmunk sqlite curl zlib bzip2 libjpeg libpng freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf diff --git a/pkgs/games/xsokoban/default.nix b/pkgs/games/xsokoban/default.nix index 63dc0a271f9..b3b3954da8c 100644 --- a/pkgs/games/xsokoban/default.nix +++ b/pkgs/games/xsokoban/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "3.3c" a; + version = a.lib.attrByPath ["version"] "3.3c" a; buildInputs = with a; [ a.libX11 a.xproto a.libXpm a.libXt ]; diff --git a/pkgs/games/zangband/default.nix b/pkgs/games/zangband/default.nix index c339f486300..dd654edcfe1 100644 --- a/pkgs/games/zangband/default.nix +++ b/pkgs/games/zangband/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "2.7.3" a; + version = a.lib.attrByPath ["version"] "2.7.3" a; buildInputs = with a; [ ncurses flex bison autoconf automake m4 ]; diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix index 1348a15bdba..1d3cabe6f1b 100644 --- a/pkgs/lib/attrsets.nix +++ b/pkgs/lib/attrsets.nix @@ -12,21 +12,24 @@ rec { /* Return an attribute from nested attribute sets. For instance ["x" "y"] applied to some set e returns e.x.y, if it exists. The - default value is returned otherwise. !!! there is also - builtins.getAttr (is there a better name for this function?) - */ - getAttr = attrPath: default: e: + default value is returned otherwise. */ + attrByPath = attrPath: default: e: let attr = head attrPath; in if attrPath == [] then 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; + # 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: 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. diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index b8e49bad977..d515158c00a 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -111,7 +111,7 @@ rec { pairMap = innerPairMap []; - # shortcut for getAttr ["name"] default attrs + # shortcut for attrByPath ["name"] default attrs maybeAttr = name: default: attrs: if (__hasAttr name attrs) then (__getAttr name attrs) else default; @@ -131,14 +131,14 @@ rec { checkFlag = attrSet: name: if (name == "true") then true else if (name == "false") then false else - if (elem name (getAttr ["flags"] [] attrSet)) then true else - getAttr [name] false attrSet ; + if (elem name (attrByPath ["flags"] [] attrSet)) then true else + attrByPath [name] false attrSet ; # Input : attrSet, [ [name default] ... ], name # Output : its value or default. 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 let x = builtins.head argList; in if (head x) == name then diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix index bd42b1dcf34..2e867cf44d7 100644 --- a/pkgs/lib/options.nix +++ b/pkgs/lib/options.nix @@ -193,7 +193,7 @@ rec { cfg3 = noImportConditions cfg2; in cfg3; - getRequire = x: toList (getAttr ["require"] [] (preprocess x)); + getRequire = x: toList (attrByPath ["require"] [] (preprocess x)); getRecusiveRequire = x: fold (cfg: l: if isPath cfg then @@ -221,7 +221,7 @@ rec { lib.fix (fixOptionSetsFun merge pkgs opts); optionAttrSetToDocList = l: attrs: - if (getAttr ["_type"] "" attrs) == "option" then + if (attrByPath ["_type"] "" attrs) == "option" then [({ #inherit (attrs) description; description = if attrs ? description then attrs.description else @@ -582,4 +582,4 @@ rec { mkNotdef ) prioValList; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/linux/atheros/r3693.nix b/pkgs/os-specific/linux/atheros/r3693.nix index 676298e5994..b6144f81f8d 100644 --- a/pkgs/os-specific/linux/atheros/r3693.nix +++ b/pkgs/os-specific/linux/atheros/r3693.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { builder = writeScript (name + "-builder") (textClosure localDefs ((lib.optional - (lib.getAttr ["freshHAL"] false args) + (lib.attrByPath ["freshHAL"] false args) preBuild) ++ [doMakeInstall postInstall doForceShare doPropagate])); diff --git a/pkgs/os-specific/linux/atheros/r3837.nix b/pkgs/os-specific/linux/atheros/r3837.nix index 3bc887e0717..39f5488ba6c 100644 --- a/pkgs/os-specific/linux/atheros/r3837.nix +++ b/pkgs/os-specific/linux/atheros/r3837.nix @@ -29,12 +29,12 @@ in stdenv.mkDerivation rec { name = "atheros-"+version; patches = lib.optional - (lib.getAttr ["injectionPatch"] false args) + (lib.attrByPath ["injectionPatch"] false args) injectionPatchFile; builder = writeScript (name + "-builder") (textClosure localDefs ((lib.optional - (lib.getAttr ["freshHAL"] false args) + (lib.attrByPath ["freshHAL"] false args) preBuild) ++ [doPatch doMakeInstall postInstall doForceShare doPropagate])); diff --git a/pkgs/os-specific/linux/atheros/r3867.nix b/pkgs/os-specific/linux/atheros/r3867.nix index 43598176895..95a834dd67a 100644 --- a/pkgs/os-specific/linux/atheros/r3867.nix +++ b/pkgs/os-specific/linux/atheros/r3867.nix @@ -29,12 +29,12 @@ in stdenv.mkDerivation rec { name = "atheros-"+version; patches = lib.optional - (lib.getAttr ["injectionPatch"] false args) + (lib.attrByPath ["injectionPatch"] false args) injectionPatchFile; builder = writeScript (name + "-builder") (textClosure localDefs ((lib.optional - (lib.getAttr ["freshHAL"] false args) + (lib.attrByPath ["freshHAL"] false args) preBuild) ++ [doPatch doMakeInstall postInstall doForceShare doPropagate])); diff --git a/pkgs/os-specific/linux/btrfsprogs/default.nix b/pkgs/os-specific/linux/btrfsprogs/default.nix index a8f2c7ea46f..62d3b130ca5 100644 --- a/pkgs/os-specific/linux/btrfsprogs/default.nix +++ b/pkgs/os-specific/linux/btrfsprogs/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.18" a; + version = a.lib.attrByPath ["version"] "0.18" a; buildInputs = with a; [ zlib e2fsprogs acl ]; diff --git a/pkgs/os-specific/linux/fbterm/default.nix b/pkgs/os-specific/linux/fbterm/default.nix index 8ded70dd44b..7d6778bca88 100644 --- a/pkgs/os-specific/linux/fbterm/default.nix +++ b/pkgs/os-specific/linux/fbterm/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "1.2" a; + version = a.lib.attrByPath ["version"] "1.2" a; buildInputs = with a; [ gpm fontconfig freetype pkgconfig ]; diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix index cdf275b585f..12543830809 100644 --- a/pkgs/servers/http/nginx/default.nix +++ b/pkgs/servers/http/nginx/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "0.7.47" args; + version = lib.attrByPath ["version"] "0.7.47" args; buildInputs = with args; [ openssl zlib pcre libxml2 libxslt ]; diff --git a/pkgs/servers/xmpp/pyIRCt/default.nix b/pkgs/servers/xmpp/pyIRCt/default.nix index c6fed881e43..161942519e8 100644 --- a/pkgs/servers/xmpp/pyIRCt/default.nix +++ b/pkgs/servers/xmpp/pyIRCt/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.4" a; + version = a.lib.attrByPath ["version"] "0.4" a; buildInputs = with a; [ xmpppy pythonIRClib python makeWrapper ]; diff --git a/pkgs/tools/X11/xnee/default.nix b/pkgs/tools/X11/xnee/default.nix index 9f9fc7345cf..a35812f22a5 100644 --- a/pkgs/tools/X11/xnee/default.nix +++ b/pkgs/tools/X11/xnee/default.nix @@ -3,7 +3,7 @@ let fetchurl = args.fetchurl; lib=args.lib; - version = lib.getAttr ["version"] "3.01" args; + version = lib.attrByPath ["version"] "3.01" args; buildInputs = with args; [ libX11 xproto libXext xextproto libXtst gtk libXi inputproto pkgconfig recordproto diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index dcad21290ef..e72f96ea85e 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "0.6" a; + version = a.lib.attrByPath ["version"] "0.6" a; buildInputs = with a; [ cmake imagemagick patchelf ]; diff --git a/pkgs/tools/graphics/dmtx/default.nix b/pkgs/tools/graphics/dmtx/default.nix index 17f390cd7dd..8a06c261c2c 100644 --- a/pkgs/tools/graphics/dmtx/default.nix +++ b/pkgs/tools/graphics/dmtx/default.nix @@ -3,7 +3,7 @@ let lib = args.lib; fetchurl = args.fetchurl; - version = lib.getAttr ["version"] "0.7.0" args; + version = lib.attrByPath ["version"] "0.7.0" args; buildInputs = with args; [ libpng libtiff libjpeg librsvg imagemagick pkgconfig zlib libX11 bzip2 libtool diff --git a/pkgs/tools/graphics/qrdecode/default.nix b/pkgs/tools/graphics/qrdecode/default.nix index 515bbb0fcda..39e61aba667 100644 --- a/pkgs/tools/graphics/qrdecode/default.nix +++ b/pkgs/tools/graphics/qrdecode/default.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "0.9.3" args; + version = lib.attrByPath ["version"] "0.9.3" args; buildInputs = with args; [ libpng libcv ]; diff --git a/pkgs/tools/graphics/qrencode/default.nix b/pkgs/tools/graphics/qrencode/default.nix index 28f7b579b4d..ae836ec086b 100644 --- a/pkgs/tools/graphics/qrencode/default.nix +++ b/pkgs/tools/graphics/qrencode/default.nix @@ -3,7 +3,7 @@ let lib = args.lib; fetchurl = args.fetchurl; - version = lib.getAttr ["version"] "3.0.3" args; + version = lib.attrByPath ["version"] "3.0.3" args; buildInputs = with args; [ libpng pkgconfig ]; diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index 35e0ccb92fe..08097b4f5b3 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "2.4.4" a; + version = a.lib.attrByPath ["version"] "2.4.4" a; buildInputs = with a; [ ]; diff --git a/pkgs/tools/networking/rp-pppoe/default.nix b/pkgs/tools/networking/rp-pppoe/default.nix index 02439c230ff..8a704bb5711 100644 --- a/pkgs/tools/networking/rp-pppoe/default.nix +++ b/pkgs/tools/networking/rp-pppoe/default.nix @@ -2,7 +2,7 @@ a : let fetchurl = a.fetchurl; - version = a.lib.getAttr ["version"] "3.10" a; + version = a.lib.attrByPath ["version"] "3.10" a; buildInputs = with a; [ ppp ]; diff --git a/pkgs/tools/security/bmrsa/11.nix b/pkgs/tools/security/bmrsa/11.nix index cb993d054c3..216cf1c17d8 100644 --- a/pkgs/tools/security/bmrsa/11.nix +++ b/pkgs/tools/security/bmrsa/11.nix @@ -4,7 +4,7 @@ let fetchurl = args.fetchurl; fullDepEntry = args.fullDepEntry; - version = lib.getAttr ["version"] "" args; + version = lib.attrByPath ["version"] "" args; buildInputs = with args; [ unzip ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d7b89a61dff..be4cf5bc07f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -66,7 +66,7 @@ let # Return an attribute from the Nixpkgs configuration file, or # 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' @@ -5987,12 +5987,23 @@ let inherit fetchurl stdenv jdk; inherit (gtkLibs) gtk glib; inherit (xlibs) libXtst; - inherit plugins; + inherit plugins makeOverridable unzip; }; 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 { inherit fetchurl stdenv; @@ -6300,7 +6311,8 @@ let }; 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; openexr = openexr_1_6_1; }; @@ -6774,11 +6786,6 @@ let # 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) { inherit clisp texinfo; };