make-derivation: use pname-version as default name if both are present
This commit is contained in:
parent
79c7ccd351
commit
efca8b4b97
@ -12,7 +12,9 @@ rec {
|
|||||||
# * https://nixos.org/nix/manual/#ssec-derivation
|
# * https://nixos.org/nix/manual/#ssec-derivation
|
||||||
# Explanation about derivations in general
|
# Explanation about derivations in general
|
||||||
mkDerivation =
|
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
|
# These types of dependencies are all exhaustively documented in
|
||||||
# the "Specifying Dependencies" section of the "Standard
|
# the "Specifying Dependencies" section of the "Standard
|
||||||
|
Loading…
x
Reference in New Issue
Block a user