From f6e5ea8a2c0872acd83b98dd37e32f28006407b7 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Mon, 23 Jan 2023 22:58:03 +0100 Subject: [PATCH] documentation-highlighter: Only depend on needed files Makes the build independency of the default.nix and update.sh file by explicitly specifying the files that are needed in the result This allows changing those files without causing a rebuild --- pkgs/misc/documentation-highlighter/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/documentation-highlighter/default.nix b/pkgs/misc/documentation-highlighter/default.nix index 2a34e36742d5..22ea3a5f86e3 100644 --- a/pkgs/misc/documentation-highlighter/default.nix +++ b/pkgs/misc/documentation-highlighter/default.nix @@ -7,6 +7,16 @@ runCommand "documentation-highlighter" { platforms = lib.platforms.all; maintainers = [ lib.maintainers.grahamc ]; }; + src = lib.sources.cleanSourceWith { + src = ./.; + filter = path: type: lib.elem path (map toString [ + ./highlight.pack.js + ./LICENSE + ./loader.js + ./mono-blue.css + ./README.md + ]); + }; } '' - cp -r ${./.} $out + cp -r "$src" "$out" ''