about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2023-06-15 18:51:37 +0200
committerCole Helbling <cole.e.helbling@outlook.com>2023-06-15 12:06:54 -0700
commit7a53daed2a71fd4b7b177bc48f2f9c996a5bb4b2 (patch)
tree9ebf8c0948d35edd7c41e695ec2a15c1f9e97708 /pkgs/misc
parent4f992e8da039741e40de9cb15450bb621c562df7 (diff)
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.
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/documentation-highlighter/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/misc/documentation-highlighter/default.nix b/pkgs/misc/documentation-highlighter/default.nix
index 22ea3a5f86e37..3a7f5b21c69e9 100644
--- a/pkgs/misc/documentation-highlighter/default.nix
+++ b/pkgs/misc/documentation-highlighter/default.nix
@@ -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"
     ]);
   };
 } ''