about summary refs log tree commit diff
path: root/pkgs/stdenv/generic
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r--pkgs/stdenv/generic/make-derivation.nix13
1 files changed, 1 insertions, 12 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index cb3731da1934..e06faed30a1e 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -12,9 +12,7 @@ rec {
   # * https://nixos.org/nix/manual/#ssec-derivation
   #   Explanation about derivations in general
   mkDerivation =
-    { name ? if attrs ? pname && attrs ? version
-        then "${attrs.pname}-${attrs.version}"
-        else ""
+    { name ? ""
 
     # These types of dependencies are all exhaustively documented in
     # the "Specifying Dependencies" section of the "Standard
@@ -67,8 +65,6 @@ rec {
     , pos ? # position used in error messages and for meta.position
         (if attrs.meta.description or null != null
           then builtins.unsafeGetAttrPos "description" attrs.meta
-          else if attrs.version or null != null
-          then builtins.unsafeGetAttrPos "version" attrs
           else builtins.unsafeGetAttrPos "name" attrs)
     , separateDebugInfo ? false
     , outputs ? [ "out" ]
@@ -82,13 +78,6 @@ rec {
 
     , ... } @ attrs:
 
-    # Check that the name is consistent with pname and version:
-    assert lib.assertMsg
-      (lib.lists.all (name: builtins.hasAttr name attrs) ["name" "pname" "version"]
-        -> lib.strings.hasSuffix "${attrs.pname}-${attrs.version}" attrs.name)
-      ("mkDerivation: `name` (\"${attrs.name}\") must be consistent " +
-       "with `pname-version` \"${attrs.pname}-${attrs.version}\"");
-
     let
       # TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
       # no package has `doCheck = true`.