diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index e06faed30a1e..8fd58c3cbe91 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -12,7 +12,9 @@ rec { # * https://nixos.org/nix/manual/#ssec-derivation # Explanation about derivations in general mkDerivation = - { name ? "" + { name ? if builtins.hasAttr "pname" attrs && builtins.hasAttr "version" attrs + then "${attrs.pname}-${attrs.version}" + else "" # These types of dependencies are all exhaustively documented in # the "Specifying Dependencies" section of the "Standard