documentation-highlighter: less weird source filter

The expansion into absolute paths caused the filter to reject all the
files in some unusual circumstances (we think it's due to use of a
chroot store). This works reliably no matter where nixpkgs is located.
This commit is contained in:
Linus Heckemann 2023-06-15 18:51:37 +02:00 committed by Cole Helbling
parent 4f992e8da0
commit 7a53daed2a

View file

@ -9,12 +9,12 @@ runCommand "documentation-highlighter" {
};
src = lib.sources.cleanSourceWith {
src = ./.;
filter = path: type: lib.elem path (map toString [
./highlight.pack.js
./LICENSE
./loader.js
./mono-blue.css
./README.md
filter = path: type: lib.elem (baseNameOf path) ([
"highlight.pack.js"
"LICENSE"
"loader.js"
"mono-blue.css"
"README.md"
]);
};
} ''