From abea6f461ae886544917e32634e5612b0fc73c13 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 4 Nov 2018 11:01:09 +0100 Subject: 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. --- pkgs/stdenv/generic/make-derivation.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'pkgs/stdenv/generic') 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`. -- cgit 1.4.1