diff --git a/pkgs/development/coq-modules/QuickChick/default.nix b/pkgs/development/coq-modules/QuickChick/default.nix index 34daebcdf52..96954eb43ac 100644 --- a/pkgs/development/coq-modules/QuickChick/default.nix +++ b/pkgs/development/coq-modules/QuickChick/default.nix @@ -28,7 +28,7 @@ let params = propagatedBuildInputs = [ coq-ext-lib simple-io ]; }; }; - param = params."${coq.coq-version}" or params."8.8"; + param = params."${coq.coq-version}"; in stdenv.mkDerivation rec { diff --git a/pkgs/development/coq-modules/Velisarios/default.nix b/pkgs/development/coq-modules/Velisarios/default.nix index aa5ebb32b3c..cd7ddfefb84 100644 --- a/pkgs/development/coq-modules/Velisarios/default.nix +++ b/pkgs/development/coq-modules/Velisarios/default.nix @@ -20,7 +20,7 @@ let params = sha256 = "0l9885nxy0n955fj1gnijlxl55lyxiv9yjfmz8hmfrn9hl8vv1m2"; }; }; - param = params."${coq.coq-version}" or params."8.8"; + param = params."${coq.coq-version}"; in stdenv.mkDerivation rec { diff --git a/pkgs/development/coq-modules/category-theory/default.nix b/pkgs/development/coq-modules/category-theory/default.nix index a8fd91d9d34..59f2295e215 100644 --- a/pkgs/development/coq-modules/category-theory/default.nix +++ b/pkgs/development/coq-modules/category-theory/default.nix @@ -18,7 +18,7 @@ let "8.7" = v20180709; "8.8" = v20181016; }; - param = params."${coq.coq-version}" or params."8.8"; + param = params."${coq.coq-version}"; in stdenv.mkDerivation rec { diff --git a/pkgs/development/coq-modules/coq-haskell/default.nix b/pkgs/development/coq-modules/coq-haskell/default.nix index 784e360a0da..57f31e1847c 100644 --- a/pkgs/development/coq-modules/coq-haskell/default.nix +++ b/pkgs/development/coq-modules/coq-haskell/default.nix @@ -26,7 +26,7 @@ let params = sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv"; }; }; - param = params."${coq.coq-version}" or params."8.8"; + param = params."${coq.coq-version}"; in stdenv.mkDerivation rec { diff --git a/pkgs/development/coq-modules/coqprime/default.nix b/pkgs/development/coq-modules/coqprime/default.nix index 265b97deca2..191812b3f2e 100644 --- a/pkgs/development/coq-modules/coqprime/default.nix +++ b/pkgs/development/coq-modules/coqprime/default.nix @@ -14,7 +14,7 @@ let params = "8.8" = v_8_8; "8.9" = v_8_8; }; - param = params."${coq.coq-version}" or params."8.9" + param = params."${coq.coq-version}" ; in stdenv.mkDerivation rec { diff --git a/pkgs/development/coq-modules/dpdgraph/default.nix b/pkgs/development/coq-modules/dpdgraph/default.nix index 6a06c1b1987..e403f7d4fb5 100644 --- a/pkgs/development/coq-modules/dpdgraph/default.nix +++ b/pkgs/development/coq-modules/dpdgraph/default.nix @@ -22,7 +22,7 @@ let params = { sha256 = "0qvar8gfbrcs9fmvkph5asqz4l5fi63caykx3bsn8zf0xllkwv0n"; }; }; -param = params."${coq.coq-version}" or params."8.8"; +param = params."${coq.coq-version}"; in stdenv.mkDerivation { diff --git a/pkgs/development/coq-modules/equations/default.nix b/pkgs/development/coq-modules/equations/default.nix index 1bc66fcf272..86e5687321b 100644 --- a/pkgs/development/coq-modules/equations/default.nix +++ b/pkgs/development/coq-modules/equations/default.nix @@ -26,7 +26,7 @@ let sha256 = "1sj7vyarmvp1w5kvbhgpgap1yd0yrj4n1jrla0wv70k0jrq5hhpz"; }; }; - param = params."${coq.coq-version}" or params."8.8"; + param = params."${coq.coq-version}"; in stdenv.mkDerivation rec { diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 9ba06995940..fdb3a2ce35a 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -12,7 +12,7 @@ rec { # * https://nixos.org/nix/manual/#ssec-derivation # Explanation about derivations in general mkDerivation = - { name ? "" + { # These types of dependencies are all exhaustively documented in # the "Specifying Dependencies" section of the "Standard @@ -21,7 +21,7 @@ rec { # TODO(@Ericson2314): Stop using legacy dep attribute names # host offset -> target offset - , depsBuildBuild ? [] # -1 -> -1 + depsBuildBuild ? [] # -1 -> -1 , depsBuildBuildPropagated ? [] # -1 -> -1 , nativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name , propagatedNativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name @@ -177,14 +177,14 @@ rec { "checkInputs" "installCheckInputs" "__impureHostDeps" "__propagatedImpureHostDeps" "sandboxProfile" "propagatedSandboxProfile"]) - // (lib.optionalAttrs (name == "")) { + // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) { name = "${attrs.pname}-${attrs.version}"; - } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)) { + } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) { # Fixed-output derivations like source tarballs shouldn't get a host # suffix. But we have some weird ones with run-time deps that are # just used for their side-affects. Those might as well since the # hash can't be the same. See #32986. - name = "${if name != "" then name else "${attrs.pname}-${attrs.version}"}-${stdenv.hostPlatform.config}"; + name = "${attrs.name or "${attrs.pname}-${attrs.version}"}-${stdenv.hostPlatform.config}"; } // { builder = attrs.realBuilder or stdenv.shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; @@ -274,7 +274,7 @@ rec { meta = { # `name` above includes cross-compilation cruft (and is under assert), # lets have a clean always accessible version here. - name = if name != "" then name else "${attrs.pname}-${attrs.version}"; + name = attrs.name or "${attrs.pname}-${attrs.version}"; # If the packager hasn't specified `outputsToInstall`, choose a default, # which is the name of `p.bin or p.out or p`;