From 7a53daed2a71fd4b7b177bc48f2f9c996a5bb4b2 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 15 Jun 2023 18:51:37 +0200 Subject: [PATCH] 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. --- pkgs/misc/documentation-highlighter/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/documentation-highlighter/default.nix b/pkgs/misc/documentation-highlighter/default.nix index 22ea3a5f86e3..3a7f5b21c69e 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" ]); }; } ''