9b090ccbca
That is because this commit should be merged to both master and release-19.09.
24 lines
705 B
Nix
24 lines
705 B
Nix
{ stdenv, nodePackages_10_x }:
|
|
|
|
let
|
|
linkNodeDeps = ({ pkg, deps, name ? "" }:
|
|
let
|
|
targetModule = if name != "" then name else stdenv.lib.getName pkg;
|
|
in nodePackages_10_x.${pkg}.override (oldAttrs: {
|
|
postInstall = ''
|
|
mkdir -p $out/lib/node_modules/${targetModule}/node_modules
|
|
${stdenv.lib.concatStringsSep "\n" (map (dep: ''
|
|
ln -s ${nodePackages_10_x.${dep}}/lib/node_modules/${stdenv.lib.getName dep} \
|
|
$out/lib/node_modules/${targetModule}/node_modules/${stdenv.lib.getName dep}
|
|
'') deps
|
|
)}
|
|
'';
|
|
})
|
|
);
|
|
in linkNodeDeps {
|
|
pkg = "@antora/cli";
|
|
name = "@antora/cli";
|
|
deps = [
|
|
"@antora/site-generator-default"
|
|
];
|
|
}
|