diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix index 5c224802d5bf33..179c0e65c5094c 100644 --- a/pkgs/top-level/default.nix +++ b/pkgs/top-level/default.nix @@ -27,6 +27,10 @@ , # Allow a configuration attribute set to be passed in as an argument. config ? {} +, # Temporary hack to let Nixpkgs CI forbid use of `lib.fileset` until + # is fixed. + __allowFileset ? true + , # List of overlays layers used to extend Nixpkgs. overlays ? [] @@ -47,7 +51,24 @@ let # Rename the function arguments crossSystem0 = crossSystem; in let - lib = import ../../lib; + pristineLib = import ../../lib; + + lib = + if __allowFileset then + pristineLib + else + pristineLib.extend (_: _: { + fileset = abort '' + + The use of `lib.fileset` is currently forbidden in Nixpkgs due to the + upstream Nix bug . This + causes difficult‐to‐debug errors when combined with chroot stores, + such as in the NixOS installer. + + For packages that require source to be vendored inside Nixpkgs, + please use a subdirectory of the package instead. + ''; + }); inherit (lib) throwIfNot; diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 0b70ea631244f0..78d4c435bbeeec 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -57,6 +57,10 @@ let inHydra = true; }; + + # Catch use of `lib.fileset` in CI until + # is fixed. + __allowFileset = false; }; }; recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; };