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
|
# * https://nixos.org/nix/manual/#ssec-derivation
|
||||||
# Explanation about derivations in general
|
# Explanation about derivations in general
|
||||||
mkDerivation =
|
mkDerivation =
|
||||||
{ name ? if builtins.hasAttr "pname" attrs && builtins.hasAttr "version" attrs
|
{ name ? if attrs ? pname && attrs ? version
|
||||||
then "${attrs.pname}-${attrs.version}"
|
then "${attrs.pname}-${attrs.version}"
|
||||||
else ""
|
else ""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user