From 5be927db142448207c6a1d0c6e58ac5eb2af1fc5 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Mon, 29 Oct 2018 15:17:13 +0100 Subject: [PATCH] make-derivation: use `?` instead of `builtins.hasAttr` As suggested by @edolstra --- pkgs/stdenv/generic/make-derivation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 6f31e09b1251..9f6fee937101 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -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 ""