summaryrefslogtreecommitdiffstats
path: root/pkgs/development/tools/documentation
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-24 17:22:28 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-24 17:22:28 +0000
commit9b090ccbca3f7dd26d91db06e96e8bf8282c37ca (patch)
tree1654f2f0cb883fa4cb95def306a933475d065431 /pkgs/development/tools/documentation
parent99537e994f09e8e5499d3d877df0e16da8452ca7 (diff)
treewide: Get rid of most `parseDrvName` without breaking compat
That is because this commit should be merged to both master and release-19.09.
Diffstat (limited to 'pkgs/development/tools/documentation')
-rw-r--r--pkgs/development/tools/documentation/antora/default.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/development/tools/documentation/antora/default.nix b/pkgs/development/tools/documentation/antora/default.nix
index 9f1aa0370871..6427fa461dde 100644
--- a/pkgs/development/tools/documentation/antora/default.nix
+++ b/pkgs/development/tools/documentation/antora/default.nix
@@ -1,16 +1,15 @@
{ stdenv, nodePackages_10_x }:
let
- drvName = drv: (builtins.parseDrvName drv).name;
linkNodeDeps = ({ pkg, deps, name ? "" }:
let
- targetModule = if name != "" then name else drvName pkg;
+ 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/${drvName dep} \
- $out/lib/node_modules/${targetModule}/node_modules/${drvName 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
)}
'';