diff options
author | Domen Kožar <domen@dev.si> | 2019-07-23 10:10:51 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2019-07-23 10:16:15 +0200 |
commit | e765dde91096854a872ded32566ad242280c12cf (patch) | |
tree | 74abf04b8b8250686027b690d11d2186d2495bf9 /pkgs/development/tools | |
parent | 5dc50eab6809748f1e55c877631854b5f0cb7876 (diff) |
antora: include site-generator-default
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/documentation/antora/default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/development/tools/documentation/antora/default.nix b/pkgs/development/tools/documentation/antora/default.nix new file mode 100644 index 000000000000..9f1aa0370871 --- /dev/null +++ b/pkgs/development/tools/documentation/antora/default.nix @@ -0,0 +1,25 @@ +{ stdenv, nodePackages_10_x }: + +let + drvName = drv: (builtins.parseDrvName drv).name; + linkNodeDeps = ({ pkg, deps, name ? "" }: + let + targetModule = if name != "" then name else drvName 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/${drvName dep} \ + $out/lib/node_modules/${targetModule}/node_modules/${drvName dep} + '') deps + )} + ''; + }) +); +in linkNodeDeps { + pkg = "@antora/cli"; + name = "@antora/cli"; + deps = [ + "@antora/site-generator-default" + ]; +} |