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;
|
||||
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)
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
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/;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"];
|
||||
|
|
|
@ -2,7 +2,7 @@ a :
|
|||
let
|
||||
fetchurl = a.fetchurl;
|
||||
|
||||
version = a.lib.getAttr ["version"] "" a;
|
||||
version = a.lib.attrByPath ["version"] "" a;
|
||||
buildInputs = with a; [
|
||||
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"];
|
||||
|
||||
|
|
|
@ -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)";
|
||||
};
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; [
|
||||
|
||||
];
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]));
|
||||
|
|
|
@ -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]));
|
||||
|
|
|
@ -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]));
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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; [
|
||||
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue