nixpkgs-suyu/pkgs/development/tools/documentation/antora/default.nix
John Ericson 9b090ccbca treewide: Get rid of most parseDrvName without breaking compat
That is because this commit should be merged to both master and
release-19.09.
2019-11-24 17:22:28 +00:00

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"
];
}