about summary refs log tree commit diff
path: root/lib/meta.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/meta.nix')
-rw-r--r--lib/meta.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/meta.nix b/lib/meta.nix
index 1af3147334865..44e3cc011f187 100644
--- a/lib/meta.nix
+++ b/lib/meta.nix
@@ -31,11 +31,10 @@ rec {
   updateName = updater: drv: drv // {name = updater (drv.name);};
 
 
-  /* Append a suffix to the name of a package.  !!! the suffix should
-     really be appended *before* the version, at least most of the
-     time.
-  */
-  appendToName = suffix: updateName (name: "${name}-${suffix}");
+  /* Append a suffix to the name of a package (before the version
+     part). */
+  appendToName = suffix: updateName (name:
+    let x = builtins.parseDrvName name; in "${x.name}-${suffix}-${x.version}");
 
 
   /* Apply a function to each derivation and only to derivations in an attrset