diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-08-21 15:41:53 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-08-21 15:41:53 -0500 |
commit | 379fc894de3b3ec69cde73454853b4ac4eee4065 (patch) | |
tree | 79b5e82daccf2de704d0230d191f3313f16a1694 /lib | |
parent | 9c35796ee31939f6c12fc05e6d1a4a0f544ecc5d (diff) | |
parent | 28e51c7ceac1c3df219dbf8388bf122f817459b7 (diff) | |
download | nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.tar nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.tar.gz nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.tar.bz2 nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.tar.lz nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.tar.xz nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.tar.zst nixlib-379fc894de3b3ec69cde73454853b4ac4eee4065.zip |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'lib')
-rw-r--r-- | lib/customisation.nix | 3 | ||||
-rw-r--r-- | lib/default.nix | 2 | ||||
-rw-r--r-- | lib/licenses.nix | 5 | ||||
-rw-r--r-- | lib/strings.nix | 9 |
4 files changed, 17 insertions, 2 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index 480280428909..0107ed33d9e4 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -195,9 +195,10 @@ rec { let self = f self // { newScope = scope: newScope (self // scope); callPackage = self.newScope {}; + # TODO(@Ericson2314): Haromonize argument order of `g` with everything else overrideScope = g: makeScope newScope - (self_: let super = f self_; in super // g super self_); + (lib.fixedPoints.extends (lib.flip g) f); packages = f; }; in self; diff --git a/lib/default.nix b/lib/default.nix index c1a4a1e39a81..dd6fcec75e21 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -80,7 +80,7 @@ let inherit (strings) concatStrings concatMapStrings concatImapStrings intersperse concatStringsSep concatMapStringsSep concatImapStringsSep makeSearchPath makeSearchPathOutput - makeLibraryPath makeBinPath makePerlPath optionalString + makeLibraryPath makeBinPath makePerlPath makeFullPerlPath optionalString hasPrefix hasSuffix stringToCharacters stringAsChars escape escapeShellArg escapeShellArgs replaceChars lowerChars upperChars toLower toUpper addContextFrom splitString diff --git a/lib/licenses.nix b/lib/licenses.nix index a5f1fc0f0f21..c442d74c857c 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -654,6 +654,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { fullName = "wxWindows Library Licence, Version 3.1"; }; + xfig = { + fullName = "xfig"; + url = "http://mcj.sourceforge.net/authors.html#xfig"; + }; + zlib = spdx { spdxId = "Zlib"; fullName = "zlib License"; diff --git a/lib/strings.nix b/lib/strings.nix index 7cd09a109396..af932ce6ecff 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -126,6 +126,15 @@ rec { */ makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl"; + /* Construct a perl search path recursively including all dependencies (such as $PERL5LIB) + + Example: + pkgs = import <nixpkgs> { } + makeFullPerlPath [ pkgs.perlPackages.CGI ] + => "/nix/store/fddivfrdc1xql02h9q500fpnqy12c74n-perl-CGI-4.38/lib/perl5/site_perl:/nix/store/8hsvdalmsxqkjg0c5ifigpf31vc4vsy2-perl-HTML-Parser-3.72/lib/perl5/site_perl:/nix/store/zhc7wh0xl8hz3y3f71nhlw1559iyvzld-perl-HTML-Tagset-3.20/lib/perl5/site_perl" + */ + makeFullPerlPath = deps: makePerlPath (lib.misc.closePropagation deps); + /* Depending on the boolean `cond', return either the given string or the empty string. Useful to concatenate against a bigger string. |