summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2018-11-04 11:01:09 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2018-11-04 11:02:43 +0100
commitabea6f461ae886544917e32634e5612b0fc73c13 (patch)
tree1d5f7c6a577aa5b8a2b993d9eea87b19758fe2e2 /pkgs/stdenv
parent386691027fb9e94f5bd4a164e90c2224428a3d63 (diff)
downloadnixlib-abea6f461ae886544917e32634e5612b0fc73c13.tar
nixlib-abea6f461ae886544917e32634e5612b0fc73c13.tar.gz
nixlib-abea6f461ae886544917e32634e5612b0fc73c13.tar.bz2
nixlib-abea6f461ae886544917e32634e5612b0fc73c13.tar.lz
nixlib-abea6f461ae886544917e32634e5612b0fc73c13.tar.xz
nixlib-abea6f461ae886544917e32634e5612b0fc73c13.tar.zst
nixlib-abea6f461ae886544917e32634e5612b0fc73c13.zip
Revert "Merge pull request #49398 from Synthetica9/implement-rfc0035" to fix eval
This reverts commit 3fc7d5eb83804e10ae55b1ae9b102f88b1ea2b08, reversing
changes made to 1fddf2b68996b56804a24b67191e4d883943057d.

The idea is good, however, before enforcing, make sure all occurences
are fixed.
Diffstat (limited to 'pkgs/stdenv')
-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`.