From 25a148fa196b944b3f134527da87e43d88c066f9 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 22 May 2015 12:59:21 -0700 Subject: Refactor mkFlag / shouldUsePkg into the nixpkgs libraries --- pkgs/development/libraries/libssh/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkgs/development/libraries/libssh') diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix index e5d01f213cb..83efa5e65c9 100644 --- a/pkgs/development/libraries/libssh/default.nix +++ b/pkgs/development/libraries/libssh/default.nix @@ -7,9 +7,8 @@ , openssl ? null, libgcrypt ? null }: +with stdenv; let - shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null; - # Prefer openssl cryptoStr = if shouldUsePkg openssl != null then "openssl" else if shouldUsePkg libgcrypt != null then "libgcrypt" -- cgit 1.4.1