nixpkgs/pkgs/misc/documentation-highlighter/default.nix
Linus Heckemann 7a53daed2a 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.
2023-06-15 12:06:54 -07:00

22 lines
566 B
Nix

{ lib, runCommand }:
runCommand "documentation-highlighter" {
meta = {
description = "Highlight.js sources for the Nix Ecosystem's documentation";
homepage = "https://highlightjs.org";
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.grahamc ];
};
src = lib.sources.cleanSourceWith {
src = ./.;
filter = path: type: lib.elem (baseNameOf path) ([
"highlight.pack.js"
"LICENSE"
"loader.js"
"mono-blue.css"
"README.md"
]);
};
} ''
cp -r "$src" "$out"
''