about summary refs log tree commit diff
path: root/nixpkgs/lib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-05-12 14:45:39 +0000
committerAlyssa Ross <hi@alyssa.is>2020-05-12 14:56:01 +0000
commiteb7dadee9c0f903f1152f8dd4165453bfa48ccf4 (patch)
treea6bd66dcbec895aae167465672af08a1ca70f089 /nixpkgs/lib
parent3879b925f5dae3a0eb5c98b10c1ac5a0e4d729a3 (diff)
parent683c68232e91f76386db979c461d8fbe2a018782 (diff)
downloadnixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.gz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.bz2
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.lz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.xz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.zst
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.zip
Merge commit '683c68232e91f76386db979c461d8fbe2a018782'
Diffstat (limited to 'nixpkgs/lib')
-rw-r--r--nixpkgs/lib/licenses.nix6
-rw-r--r--nixpkgs/lib/lists.nix4
-rw-r--r--nixpkgs/lib/tests/maintainers.nix11
-rw-r--r--nixpkgs/lib/tests/release.nix15
4 files changed, 20 insertions, 16 deletions
diff --git a/nixpkgs/lib/licenses.nix b/nixpkgs/lib/licenses.nix
index a4ac08bb20e9..4c07797b16c2 100644
--- a/nixpkgs/lib/licenses.nix
+++ b/nixpkgs/lib/licenses.nix
@@ -524,12 +524,6 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
     fullName = "Microsoft Public License";
   };
 
-  msrla = {
-    fullName  = "Microsoft Research License Agreement";
-    url       = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
-    free = false;
-  };
-
   nasa13 = spdx {
     spdxId = "NASA-1.3";
     fullName = "NASA Open Source Agreement 1.3";
diff --git a/nixpkgs/lib/lists.nix b/nixpkgs/lib/lists.nix
index f9f30412770a..f424946c72cd 100644
--- a/nixpkgs/lib/lists.nix
+++ b/nixpkgs/lib/lists.nix
@@ -73,8 +73,8 @@ rec {
        lconcat [ "a" "b" "c" ]
        => "zabc"
        # different types
-       lstrange = foldl (str: int: str + toString (int + 1)) ""
-       strange [ 1 2 3 4 ]
+       lstrange = foldl (str: int: str + toString (int + 1)) "a"
+       lstrange [ 1 2 3 4 ]
        => "a2345"
   */
   foldl = op: nul: list:
diff --git a/nixpkgs/lib/tests/maintainers.nix b/nixpkgs/lib/tests/maintainers.nix
index 60d296eecae6..d3ed398c80a1 100644
--- a/nixpkgs/lib/tests/maintainers.nix
+++ b/nixpkgs/lib/tests/maintainers.nix
@@ -1,10 +1,11 @@
-# to run these tests:
-# nix-build nixpkgs/lib/tests/maintainers.nix
-# If nothing is output, all tests passed
-{ pkgs ? import ../.. {} }:
+# to run these tests (and the others)
+# nix-build nixpkgs/lib/tests/release.nix
+{ # The pkgs used for dependencies for the testing itself
+  pkgs
+, lib
+}:
 
 let
-  inherit (pkgs) lib;
   inherit (lib) types;
 
   maintainerModule = { config, ... }: {
diff --git a/nixpkgs/lib/tests/release.nix b/nixpkgs/lib/tests/release.nix
index ec0f9c32d3f7..eebee1b49bc8 100644
--- a/nixpkgs/lib/tests/release.nix
+++ b/nixpkgs/lib/tests/release.nix
@@ -1,8 +1,17 @@
-{ pkgs ? import ../.. {} }:
+{ # The pkgs used for dependencies for the testing itself
+  # Don't test properties of pkgs.lib, but rather the lib in the parent directory
+  pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; }
+}:
 
 pkgs.runCommandNoCC "nixpkgs-lib-tests" {
-  buildInputs = [ pkgs.nix (import ./check-eval.nix) (import ./maintainers.nix { inherit pkgs; }) ];
-  NIX_PATH = "nixpkgs=${toString pkgs.path}";
+  buildInputs = [
+    pkgs.nix
+    (import ./check-eval.nix)
+    (import ./maintainers.nix {
+      inherit pkgs;
+      lib = import ../.;
+    })
+  ];
 } ''
     datadir="${pkgs.nix}/share"
     export TEST_ROOT=$(pwd)/test-tmp