3
0
Fork 0
forked from mirrors/nixpkgs

make-derivation: use ? instead of builtins.hasAttr

As suggested by @edolstra
This commit is contained in:
Patrick Hilhorst 2018-10-29 15:17:13 +01:00
parent 2962f94fec
commit 5be927db14
No known key found for this signature in database
GPG key ID: 589BB0A8DAFEF2B2

View file

@ -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 ""