···126126 lib.warn "getLicenseFromSpdxId: No license matches the given SPDX ID: ${licstr}"127127 { shortName = licstr; }128128 );129129+130130+ /* Get the path to the main program of a derivation with either131131+ meta.mainProgram or pname or name132132+133133+ Type: getExe :: derivation -> string134134+135135+ Example:136136+ getExe pkgs.hello137137+ => "/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello"138138+ getExe pkgs.mustache-go139139+ => "/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache"140140+ */141141+ getExe = x:142142+ "${lib.getBin x}/bin/${x.meta.mainProgram or (lib.getName x)}";129143}
+7-1
lib/modules.nix
···113113 args ? {}114114 , # This would be remove in the future, Prefer _module.check option instead.115115 check ? true116116+ # Internal variable to avoid `_key` collisions regardless117117+ # of `extendModules`. Used in `submoduleWith`.118118+ # Test case: lib/tests/modules, "168767"119119+ , extensionOffset ? 0116120 }:117121 let118122 withWarnings = x:···342338 modules ? [],343339 specialArgs ? {},344340 prefix ? [],341341+ extensionOffset ? length modules,345342 }:346343 evalModules (evalModulesArgs // {347344 modules = regularModules ++ modules;348345 specialArgs = evalModulesArgs.specialArgs or {} // specialArgs;349346 prefix = extendArgs.prefix or evalModulesArgs.prefix;347347+ inherit extensionOffset;350348 });351349352350 type = lib.types.submoduleWith {353353- inherit modules specialArgs;351351+ inherit modules specialArgs extensionOffset;354352 };355353356354 result = withWarnings {
+5-1
lib/tests/modules.sh
···293293294294# moduleType295295checkConfigOutput '^"a b"$' config.resultFoo ./declare-variants.nix ./define-variant.nix296296-checkConfigOutput '^"a y z"$' config.resultFooBar ./declare-variants.nix ./define-variant.nix296296+checkConfigOutput '^"a b y z"$' config.resultFooBar ./declare-variants.nix ./define-variant.nix297297checkConfigOutput '^"a b c"$' config.resultFooFoo ./declare-variants.nix ./define-variant.nix298298299299## emptyValue's···326326327327# Test that types.optionType leaves types untouched as long as they don't need to be merged328328checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survives-type-merge.nix329329+330330+# Anonymous submodules don't get nixed by import resolution/deduplication331331+# because of an `extendModules` bug, issue 168767.332332+checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-imports.nix329333330334cat <<EOF331335====== module tests ======
···88}@args:991010if args ? minimumOCamlVersion &&1111- ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion1111+ lib.versionOlder ocaml.version args.minimumOCamlVersion1212then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"1313else1414
+2-2
pkgs/common-updater/git-updater.nix
···1010, rev-prefix ? ""1111, odd-unstable ? false1212, patchlevel-unstable ? false1313-# explicit url is useful when git protocol is used only for tags listing1414-# while actual release is referred by tarball1313+# an explicit url is needed when src.meta.homepage or src.url don't1414+# point to a git repo (eg. when using fetchurl, fetchzip, ...)1515, url ? null1616}:1717
+1-1
pkgs/common-updater/scripts/list-git-tags
···3131# By default we set url to src.url or src.meta.homepage3232if [[ -z "$url" ]]; then3333 url="$(nix-instantiate $systemArg --eval -E \3434- "with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.url or $UPDATE_NIX_ATTR_PATH.src.meta.homepage" \3434+ "with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.meta.homepage or $UPDATE_NIX_ATTR_PATH.src.url" \3535 | tr -d '"')"3636fi3737
+22
pkgs/data/fonts/kacst/default.nix
···11+{ fetchzip, lib }:22+33+let44+ version = "2.01";55+in66+fetchzip {77+ name = "kacst-${version}";88+ url = "mirror://debian/pool/main/f/fonts-kacst/fonts-kacst_${version}+mry.orig.tar.bz2";99+ sha256 = "sha256-pIO58CXfmKYRKYJ1oI+tjTwlKBRnkZ/CpIM2Xa0CDA4=";1010+1111+ postFetch = ''1212+ mkdir -p $out/share/fonts1313+ tar xjf $downloadedFile --strip-components=1 -C $out/share/fonts1414+ '';1515+1616+ meta = with lib; {1717+ description = "KACST Latin-Arabic TrueType fonts";1818+ license = licenses.gpl2Only;1919+ maintainers = with lib.maintainers; [ serge ];2020+ platforms = platforms.all;2121+ };2222+}
···272272 export EXTENSION_DIR=$out/lib/php/extensions273273 ''274274 # PKG_CONFIG need not be a relative path275275- + lib.optionalString (!lib.versionAtLeast version "7.4") ''275275+ + lib.optionalString (lib.versionOlder version "7.4") ''276276 for i in $(find . -type f -name "*.m4"); do277277 substituteInPlace $i \278278 --replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null'
+2-2
pkgs/development/libraries/boost/generic.nix
···3232assert enableNumpy -> enablePython;33333434# Boost <1.69 can't be built on linux with clang >8, because pth was removed3535-assert with lib; ((stdenv.isLinux && toolset == "clang" && !(versionOlder stdenv.cc.version "8.0.0")) -> !(versionOlder version "1.69"));3535+assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69";36363737with lib;3838let···143143 stripLen = 1;144144 extraPrefix = "libs/context/";145145 })146146- ++ optional (and (versionAtLeast version "1.70") (!versionAtLeast version "1.73")) ./cmake-paths.patch146146+ ++ optional (versionAtLeast version "1.70" && versionOlder version "1.73") ./cmake-paths.patch147147 ++ optional (versionAtLeast version "1.73") ./cmake-paths-173.patch148148 ++ optional (version == "1.77.0") (fetchpatch {149149 url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
···1010, z31111}:12121313-if !lib.versionAtLeast ocaml.version "4.08"1313+if lib.versionOlder ocaml.version "4.08"1414then throw "BAP is not available for OCaml ${ocaml.version}"1515else1616
···22, doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch6433}:4455-if !lib.versionAtLeast ocaml.version "4.02"55+if lib.versionOlder ocaml.version "4.02"66then throw "batteries is not available for OCaml ${ocaml.version}"77else88
+1-1
pkgs/development/ocaml-modules/bitstring/ppx.nix
···33, ounit44}:5566-if !lib.versionAtLeast ppxlib.version "0.18.0"66+if lib.versionOlder ppxlib.version "0.18.0"77then throw "ppx_bitstring is not available with ppxlib-${ppxlib.version}"88else99
+1-1
pkgs/development/ocaml-modules/bitv/default.nix
···11{ stdenv, lib, fetchFromGitHub, autoreconfHook, which, ocaml, findlib }:2233-if !lib.versionAtLeast ocaml.version "4.02"33+if lib.versionOlder ocaml.version "4.02"44then throw "bitv is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/bz2/default.nix
···11{ lib, stdenv, fetchFromGitLab, ocaml, findlib, bzip2, autoreconfHook }:2233-if !lib.versionAtLeast ocaml.version "4.02"33+if lib.versionOlder ocaml.version "4.02"44then throw "bz2 is not available for OCaml ${ocaml.version}"55else66
···22, faraday33}:4455-if !lib.versionAtLeast ocaml.version "4.3"55+if lib.versionOlder ocaml.version "4.3"66then throw "farfadet is not available for OCaml ${ocaml.version}"77else88
+1-1
pkgs/development/ocaml-modules/fmt/default.nix
···11{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:2233-if !lib.versionAtLeast ocaml.version "4.05"33+if lib.versionOlder ocaml.version "4.05"44then throw "fmt is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/fpath/default.nix
···11{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, astring }:2233-if !lib.versionAtLeast ocaml.version "4.03"33+if lib.versionOlder ocaml.version "4.03"44then throw "fpath is not available for OCaml ${ocaml.version}"55else66
···88, extlib99}:10101111-if !lib.versionAtLeast ocaml.version "4.04"1111+if lib.versionOlder ocaml.version "4.04"1212then throw "javalib is not available for OCaml ${ocaml.version}"1313else1414
+1-1
pkgs/development/ocaml-modules/lablgl/default.nix
···11{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut } :2233-if !lib.versionAtLeast ocaml.version "4.03"33+if lib.versionOlder ocaml.version "4.03"44then throw "lablgl is not available for OCaml ${ocaml.version}"55else66
···11{ stdenv, lib, fetchFromGitLab, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }:2233-if !lib.versionAtLeast ocaml.version "4.02"33+if lib.versionOlder ocaml.version "4.02"44|| lib.versionAtLeast ocaml.version "4.13"55then throw "lablgtk-extras is not available for OCaml ${ocaml.version}"66else
+1-1
pkgs/development/ocaml-modules/logs/default.nix
···88 webpage = "https://erratique.ch/software/${pname}";99in10101111-if !lib.versionAtLeast ocaml.version "4.03"1111+if lib.versionOlder ocaml.version "4.03"1212then throw "logs is not available for OCaml ${ocaml.version}"1313else1414
+1-1
pkgs/development/ocaml-modules/lua-ml/default.nix
···11{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, opaline }:2233-if !lib.versionAtLeast ocaml.version "4.07"33+if lib.versionOlder ocaml.version "4.07"44then throw "lua-ml is not available for OCaml ${ocaml.version}"55else66
···1515 '';1616in17171818-if !versionAtLeast ocaml.version "4.08"1818+if versionOlder ocaml.version "4.08"1919then throw "nocrypto is not available for OCaml ${ocaml.version}"2020else2121
+1-1
pkgs/development/ocaml-modules/notty/default.nix
···4455with lib;6677-if !versionAtLeast ocaml.version "4.05"77+if versionOlder ocaml.version "4.05"88then throw "notty is not available for OCaml ${ocaml.version}"99else1010
···99, num1010}:11111212-if !lib.versionAtLeast ocaml.version "4.03"1212+if lib.versionOlder ocaml.version "4.03"1313then throw "ocsigen-deriving is not available of OCaml ${ocaml.version}"1414else1515
+1-1
pkgs/development/ocaml-modules/ppxlib/default.nix
···4949}."${version}"; in50505151if param ? max_version && lib.versionAtLeast ocaml.version param.max_version5252-|| param ? min_version && !lib.versionAtLeast ocaml.version param.min_version5252+|| param ? min_version && lib.versionOlder ocaml.version param.min_version5353then throw "ppxlib-${version} is not available for OCaml ${ocaml.version}"5454else5555
···11{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, react, opaline }:2233-if !lib.versionAtLeast ocaml.version "4.04"33+if lib.versionOlder ocaml.version "4.04"44then throw "reactiveData is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/sawja/default.nix
···55 version = "1.5.11";66in7788-if !lib.versionAtLeast ocaml.version "4.07"88+if lib.versionOlder ocaml.version "4.07"99then throw "${pname} is not available for OCaml ${ocaml.version}"1010else1111
+1-1
pkgs/development/ocaml-modules/sedlex/default.nix
···11{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:2233-if !lib.versionAtLeast ocaml.version "4.02"33+if lib.versionOlder ocaml.version "4.02"44then throw "sedlex is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/sosa/default.nix
···22, findlib, ocaml, ocamlbuild33}:4455-if !lib.versionAtLeast ocaml.version "4.02"55+if lib.versionOlder ocaml.version "4.02"66then throw "sosa is not available for OCaml ${ocaml.version}"77else88
+1-1
pkgs/development/ocaml-modules/tsdl/default.nix
···11{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkg-config, ocb-stubblr }:2233-if !lib.versionAtLeast ocaml.version "4.03"33+if lib.versionOlder ocaml.version "4.03"44then throw "tsdl is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/uri/sexp.nix
···11{ lib, ocaml, buildDunePackage, uri, ounit, ppx_sexp_conv, sexplib0 }:2233-if !lib.versionAtLeast ocaml.version "4.04"33+if lib.versionOlder ocaml.version "4.04"44then throw "uri-sexp is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/uucp/default.nix
···88 doCheck = true;99in10101111-if !(lib.versionAtLeast ocaml.version minimumOCamlVersion)1111+if lib.versionOlder ocaml.version minimumOCamlVersion1212then builtins.throw "${pname} needs at least OCaml ${minimumOCamlVersion}"1313else1414
+1-1
pkgs/development/ocaml-modules/uunf/default.nix
···55 version = "14.0.0";66in7788-if !lib.versionAtLeast ocaml.version "4.03"88+if lib.versionOlder ocaml.version "4.03"99then throw "${pname} is not available for OCaml ${ocaml.version}"1010else1111
+2-2
pkgs/development/ocaml-modules/vg/default.nix
···88with lib;991010let1111- inherit (lib) optionals versionAtLeast;1111+ inherit (lib) optionals versionOlder;12121313 pname = "vg";1414 version = "0.9.4";1515 webpage = "https://erratique.ch/software/${pname}";1616in17171818-if !versionAtLeast ocaml.version "4.03"1818+if versionOlder ocaml.version "4.03"1919then throw "vg is not available for OCaml ${ocaml.version}"2020else2121
+1-1
pkgs/development/ocaml-modules/wasm/default.nix
···11{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }:2233-if !lib.versionAtLeast ocaml.version "4.03"33+if lib.versionOlder ocaml.version "4.03"44|| lib.versionOlder "4.13" ocaml.version55then throw "wasm is not available for OCaml ${ocaml.version}"66else
+1-1
pkgs/development/ocaml-modules/xmlm/default.nix
···44 webpage = "https://erratique.ch/software/${pname}";55in6677-if !lib.versionAtLeast ocaml.version "4.02"77+if lib.versionOlder ocaml.version "4.02"88then throw "xmlm is not available for OCaml ${ocaml.version}"99else1010
+1-1
pkgs/development/ocaml-modules/z3/default.nix
···11{ stdenv, lib, ocaml, findlib, zarith, z3 }:2233-if !lib.versionAtLeast ocaml.version "4.07"33+if lib.versionOlder ocaml.version "4.07"44then throw "z3 is not available for OCaml ${ocaml.version}"55else66
+1-1
pkgs/development/ocaml-modules/zarith/default.nix
···33, gmp44}:5566-if !lib.versionAtLeast ocaml.version "4.04"66+if lib.versionOlder ocaml.version "4.04"77then throw "zarith is not available for OCaml ${ocaml.version}"88else99
···16161717 patches = [1818 ./proc_path.diff # TODO: upstream to OpenSMTPD, see https://github.com/NixOS/nixpkgs/issues/540451919+ ./cross_fix.diff # TODO: remove when https://github.com/OpenSMTPD/OpenSMTPD/pull/1177 will have made it into a release1920 ];20212122 # See https://github.com/OpenSMTPD/OpenSMTPD/issues/885 for the `sh bootstrap`
···11-{ python3Packages, fetchFromGitHub }:22-33-rec {44- ansible = ansible_2_12;55-66- ansible_2_12 = python3Packages.toPythonApplication python3Packages.ansible-core;77-88- ansible_2_11 = python3Packages.toPythonApplication (python3Packages.ansible-core.overridePythonAttrs (old: rec {99- pname = "ansible-core";1010- version = "2.11.6";1111-1212- src = python3Packages.fetchPypi {1313- inherit pname version;1414- sha256 = "sha256-k9UCg8fFtHbev4PcCJs/Z5uTmouae11ijSjar7s9MDo=";1515- };1616- }));1717-1818- ansible_2_10 = python3Packages.toPythonApplication python3Packages.ansible-base;1919-2020- # End of support 2021/10/02, End of life 2021/12/312121- ansible_2_9 = python3Packages.toPythonApplication python3Packages.ansible;2222-2323- ansible_2_8 = throw "Ansible 2.8 went end of life on 2021/01/03 and has subsequently been dropped";2424-}
···2233buildGoModule rec {44 pname = "corerad";55- version = "1.1.2";55+ version = "1.2.0";6677 src = fetchFromGitHub {88 owner = "mdlayher";99 repo = "corerad";1010 rev = "v${version}";1111- sha256 = "sha256-1v7jAYLIflXIKY0zltzkre4sNv9qqWxFGWrQuOBr2s0=";1111+ sha256 = "sha256-CNDotCRxKBtg/RsrBa00r3vRKBIIZ4xqpdXkImI44QI=";1212 };13131414- vendorSha256 = "sha256-oS9nI1BELDLFksN+NbLT1Eklg67liOvcRbxtGdYGJJA=";1414+ vendorSha256 = "sha256-w15dRxIBzDN5i4RNEDuSfCHHb4wc4fw1B2wjlTk40iE=";15151616 # Since the tarball pulled from GitHub doesn't contain git tag information,1717 # we fetch the expected tag's timestamp from a file in the root of the
···11-# This file was generated by go2nix.22-[33- {44- goPackagePath = "github.com/shoenig/config";55- fetch = {66- type = "git";77- url = "https://github.com/shoenig/config";88- rev = "7d793e7ad7f175ef22743b1ea38acee8267788db";99- sha256 = "1dhcv1j5xk30kj73dfnx3xqx8mcvk9r8ywp9khgf2kq6wh9sm1qr";1010- };1111- }1212-]
+7
pkgs/top-level/aliases.nix
···7474 amuleGui = throw "amuleGui was renamed to amule-gui"; # Added 2022-02-117575 amsn = throw "amsn has been removed due to being unmaintained"; # Added 2020-12-097676 angelfish = libsForQt5.plasmaMobileGear.angelfish; # Added 2021-10-067777+ ansible_2_11 = throw "Ansible 2.11 goes end of life in 2022/11 and can't be supported throughout the 22.05 release cycle"; # Added 2022-03-307878+ ansible_2_10 = throw "Ansible 2.10 went end of life in 2022/05 and has subsequently been dropped"; # Added 2022-03-307979+ ansible_2_9 = throw "Ansible 2.9 went end of life in 2022/05 and has subsequently been dropped"; # Added 2022-03-307780 antimicro = throw "antimicro has been removed as it was broken, see antimicrox instead"; # Added 2020-08-067881 antimicroX = antimicrox; # Added 2021-10-317982 ardour_5 = throw "ardour_5 has been removed. see https://github.com/NixOS/nixpkgs/issues/139549"; # Added 2021-09-28···144141145142 ### C ###146143144144+ c14 = throw "c14 is deprecated and archived by upstream"; # Added 2022-04-10147145 caddy1 = throw "caddy 1.x has been removed from nixpkgs, as it's unmaintained: https://github.com/caddyserver/caddy/blob/master/.github/SECURITY.md#supported-versions"; # Added 2020-10-02148146 calibre-py2 = throw "calibre-py2 has been removed from nixpkgs, as calibre has upgraded to python 3. Please use calibre as replacement"; # Added 2021-01-13149147 calibre-py3 = throw "calibre-py3 has been removed from nixpkgs, as calibre's default python version is now 3. Please use calibre as replacement"; # Added 2021-01-13···652648 libgroove = throw "libgroove has been removed, because it depends on an outdated and insecure version of ffmpeg"; # Added 2022-01-21653649 libgumbo = throw "'libgumbo' has been renamed to/replaced by 'gumbo'"; # Converted to throw 2022-02-22654650 libintlOrEmpty = lib.optional (!stdenv.isLinux || stdenv.hostPlatform.libc != "glibc") gettext; # Added 2018-03-14651651+ libixp_hg = libixp;655652 libjpeg_drop = libjpeg_original; # Added 2020-06-05656653 libjson_rpc_cpp = throw "'libjson_rpc_cpp' has been renamed to/replaced by 'libjson-rpc-cpp'"; # Converted to throw 2022-02-22657654 libkml = throw "libkml has been removed from nixpkgs, as it's abandoned and no package needed it"; # Added 2021-11-09···885880 oauth2_proxy = oauth2-proxy; # Added 2021-04-18886881 octoprint-plugins = throw "octoprint-plugins are now part of the octoprint.python.pkgs package set"; # Added 2021-01-24887882 ocz-ssd-guru = throw "ocz-ssd-guru has been removed due to there being no source available"; # Added 2021-07-12883883+ odpdown = throw "odpdown has been removed because it lacks python3 support"; # Added 2022-04-25888884 ofp = throw "ofp is not compatible with odp-dpdk";889885 olifant = throw "olifant has been removed from nixpkgs, as it was unmaintained"; # Added 2021-08-05890886 onnxruntime = throw "onnxruntime has been removed due to poor maintainability"; # Added 2020-12-04···13661360 winpdb = throw "winpdb has been removed: abandoned by upstream"; # Added 2022-04-2213671361 winusb = throw "'winusb' has been renamed to/replaced by 'woeusb'"; # Converted to throw 2022-02-2213681362 wireguard = throw "'wireguard' has been renamed to/replaced by 'wireguard-tools'"; # Converted to throw 2022-02-2213631363+ wmii_hg = wmii;13691364 wxmupen64plus = throw "wxmupen64plus was removed because the upstream disappeared"; # Added 2022-01-311370136513711366 ### X ###
···34343535mapAliases ({3636 aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-303737+ ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-303738 anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-183839 asyncio-nats-client = nats-py; # added 2022-02-083940 bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15