mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
7a53daed2a
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.
23 lines
566 B
Nix
23 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"
|
|
''
|