make-derivation: use ?
instead of builtins.hasAttr
As suggested by @edolstra
This commit is contained in:
parent
2962f94fec
commit
5be927db14
|
@ -12,7 +12,7 @@ rec {
|
|||
# * https://nixos.org/nix/manual/#ssec-derivation
|
||||
# Explanation about derivations in general
|
||||
mkDerivation =
|
||||
{ name ? if builtins.hasAttr "pname" attrs && builtins.hasAttr "version" attrs
|
||||
{ name ? if attrs ? pname && attrs ? version
|
||||
then "${attrs.pname}-${attrs.version}"
|
||||
else ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue