aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/lib
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-05-20 01:39:43 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-05-20 01:39:43 +0200
commit1849de11ec1e32e9eebb83f24d5339bea88b7ed7 (patch)
tree0aaf3cead09c2d55c67c6f6a86ad20af399797d8 /nixpkgs/lib
parent304c06d7a7ea3f5c84031d325ece8d38b8c1d829 (diff)
parent0f5ce2fac0c726036ca69a5524c59a49e2973dd4 (diff)
Merge commit '0f5ce2fac0c726036ca69a5524c59a49e2973dd4'
Diffstat (limited to 'nixpkgs/lib')
-rw-r--r--nixpkgs/lib/default.nix2
-rw-r--r--nixpkgs/lib/deprecated.nix2
-rw-r--r--nixpkgs/lib/kernel.nix2
-rw-r--r--nixpkgs/lib/licenses.nix41
-rw-r--r--nixpkgs/lib/lists.nix4
-rw-r--r--nixpkgs/lib/tests/maintainers.nix11
-rw-r--r--nixpkgs/lib/tests/release.nix15
7 files changed, 43 insertions, 34 deletions
diff --git a/nixpkgs/lib/default.nix b/nixpkgs/lib/default.nix
index d00c4abec0a..e7f59a67abb 100644
--- a/nixpkgs/lib/default.nix
+++ b/nixpkgs/lib/default.nix
@@ -141,7 +141,7 @@ let
mergeAttrsWithFunc mergeAttrsConcatenateValues
mergeAttrsNoOverride mergeAttrByFunc mergeAttrsByFuncDefaults
mergeAttrsByFuncDefaultsClean mergeAttrBy
- fakeSri fakeSha256 fakeSha512
+ fakeHash fakeSha256 fakeSha512
nixType imap;
inherit (versions)
splitVersion;
diff --git a/nixpkgs/lib/deprecated.nix b/nixpkgs/lib/deprecated.nix
index 8c4fe9c390c..be0ef904c66 100644
--- a/nixpkgs/lib/deprecated.nix
+++ b/nixpkgs/lib/deprecated.nix
@@ -272,7 +272,7 @@ rec {
imap = imap1;
# Fake hashes. Can be used as hash placeholders, when computing hash ahead isn't trivial
- fakeSri = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
+ fakeHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
fakeSha256 = "0000000000000000000000000000000000000000000000000000000000000000";
fakeSha512 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
}
diff --git a/nixpkgs/lib/kernel.nix b/nixpkgs/lib/kernel.nix
index 2ce19f8cb68..8045a228d05 100644
--- a/nixpkgs/lib/kernel.nix
+++ b/nixpkgs/lib/kernel.nix
@@ -14,7 +14,7 @@ with lib;
freeform = x: { freeform = x; };
/*
- Common patterns/legacy used in common-config/hardened-config.nix
+ Common patterns/legacy used in common-config/hardened/config.nix
*/
whenHelpers = version: {
whenAtLeast = ver: mkIf (versionAtLeast version ver);
diff --git a/nixpkgs/lib/licenses.nix b/nixpkgs/lib/licenses.nix
index 81976a769c0..4c07797b16c 100644
--- a/nixpkgs/lib/licenses.nix
+++ b/nixpkgs/lib/licenses.nix
@@ -2,7 +2,7 @@
let
spdx = lic: lic // {
- url = "http://spdx.org/licenses/${lic.spdxId}.html";
+ url = "https://spdx.org/licenses/${lic.spdxId}.html";
};
in
@@ -40,13 +40,13 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
amazonsl = {
fullName = "Amazon Software License";
- url = "http://aws.amazon.com/asl/";
+ url = "https://aws.amazon.com/asl/";
free = false;
};
amd = {
fullName = "AMD License Agreement";
- url = "http://developer.amd.com/amd-license-agreement/";
+ url = "https://developer.amd.com/amd-license-agreement/";
free = false;
};
@@ -230,7 +230,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
eapl = {
fullName = "EPSON AVASYS PUBLIC LICENSE";
- url = "http://avasys.jp/hp/menu000000700/hpg000000603.htm";
+ url = "https://avasys.jp/hp/menu000000700/hpg000000603.htm";
free = false;
};
@@ -271,6 +271,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
fullName = "European Union Public License 1.1";
};
+ eupl12 = spdx {
+ spdxId = "EUPL-1.2";
+ fullName = "European Union Public License 1.2";
+ };
+
fdl12 = spdx {
spdxId = "GFDL-1.2-only";
fullName = "GNU Free Documentation License v1.2 only";
@@ -293,7 +298,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
ffsl = {
fullName = "Floodgap Free Software License";
- url = "http://www.floodgap.com/software/ffsl/license.html";
+ url = "https://www.floodgap.com/software/ffsl/license.html";
free = false;
};
@@ -370,7 +375,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
# Intel's license, seems free
iasl = {
fullName = "iASL";
- url = "http://www.calculate-linux.org/packages/licenses/iASL";
+ url = "https://old.calculate-linux.org/packages/licenses/iASL";
};
ijg = spdx {
@@ -385,13 +390,13 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
inria-compcert = {
fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
- url = "http://compcert.inria.fr/doc/LICENSE";
+ url = "http://compcert.inria.fr/doc/LICENSE"; # https is broken
free = false;
};
inria-icesl = {
fullName = "INRIA Non-Commercial License Agreement for IceSL";
- url = "http://shapeforge.loria.fr/icesl/EULA_IceSL_binary.pdf";
+ url = "http://shapeforge.loria.fr/icesl/EULA_IceSL_binary.pdf"; # https is broken
free = false;
};
@@ -469,7 +474,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
llgpl21 = {
fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp";
- url = "http://opensource.franz.com/preamble.html";
+ url = "https://opensource.franz.com/preamble.html";
};
lppl12 = spdx {
@@ -493,7 +498,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
};
# spdx.org does not (yet) differentiate between the X11 and Expat versions
- # for details see http://en.wikipedia.org/wiki/MIT_License#Various_versions
+ # for details see https://en.wikipedia.org/wiki/MIT_License#Various_versions
mit = spdx {
spdxId = "MIT";
fullName = "MIT License";
@@ -519,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";
@@ -596,7 +595,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
psfl = spdx {
spdxId = "Python-2.0";
fullName = "Python Software Foundation License version 2";
- #url = http://docs.python.org/license.html;
+ url = "https://docs.python.org/license.html";
};
publicDomain = {
@@ -620,7 +619,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
qwt = {
fullName = "Qwt License, Version 1.0";
- url = "http://qwt.sourceforge.net/qwtlicense.html";
+ url = "https://qwt.sourceforge.io/qwtlicense.html";
};
ruby = spdx {
@@ -646,7 +645,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
smail = {
shortName = "smail";
fullName = "SMAIL General Public License";
- url = "http://metadata.ftp-master.debian.org/changelogs/main/d/debianutils/debianutils_4.8.1_copyright";
+ url = "https://sources.debian.org/copyright/license/debianutils/4.9.1/";
};
sspl = {
@@ -663,7 +662,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
ufl = {
fullName = "Ubuntu Font License 1.0";
- url = "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt";
+ url = "https://ubuntu.com/legal/font-licence";
};
unfree = {
@@ -740,7 +739,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
xfig = {
fullName = "xfig";
- url = "http://mcj.sourceforge.net/authors.html#xfig";
+ url = "http://mcj.sourceforge.net/authors.html#xfig"; # https is broken
};
zlib = spdx {
diff --git a/nixpkgs/lib/lists.nix b/nixpkgs/lib/lists.nix
index f9f30412770..f424946c72c 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 60d296eecae..d3ed398c80a 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 ec0f9c32d3f..eebee1b49bc 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