mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-05 20:11:43 +03:00
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
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user