release: forbid use of lib.fileset in Nixpkgs (#369694)

This commit is contained in:
Silvan Mosberger
2025-01-01 06:51:48 +01:00
committed by GitHub
87 changed files with 115 additions and 160 deletions

View File

@@ -94,10 +94,7 @@
stdenvNoCC.mkDerivation {
name = "nixpkgs-lib-docs";
src = lib.fileset.toSource {
root = ../..;
fileset = ../../lib;
};
src = ../../lib;
nativeBuildInputs = [
nixdoc
@@ -105,6 +102,8 @@ stdenvNoCC.mkDerivation {
];
installPhase = ''
cd ..
export NIX_STATE_DIR=$(mktemp -d)
nix-instantiate --eval --strict --json ${./lib-function-locations.nix} \
--arg nixpkgsPath "./." \

View File

@@ -25,16 +25,22 @@ stdenvNoCC.mkDerivation (
nativeBuildInputs = [ nixos-render-docs ];
src = lib.fileset.toSource {
root = ../.;
fileset = lib.fileset.unions [
(lib.fileset.fileFilter (file: file.hasExt "md" || file.hasExt "md.in") ../.)
../style.css
../anchor-use.js
../anchor.min.js
../manpage-urls.json
../redirects.json
];
src = lib.cleanSourceWith {
src = ../.;
filter =
path: type:
type == "directory"
|| lib.hasSuffix ".md" path
|| lib.hasSuffix ".md.in" path
|| lib.elem path (
map toString [
../style.css
../anchor-use.js
../anchor.min.js
../manpage-urls.json
../redirects.json
]
);
};
postPatch = ''