From 22e57d6f2620e652e4cc181993179ea24956995c Mon Sep 17 00:00:00 2001 From: Allan Espinosa Date: Wed, 23 Sep 2015 13:25:53 +0900 Subject: [PATCH] oathToolkit: Support darwin --- pkgs/development/libraries/xmlsec/default.nix | 2 +- pkgs/tools/security/oath-toolkit/default.nix | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/xmlsec/default.nix b/pkgs/development/libraries/xmlsec/default.nix index 3fba451c7111..85e2f08b31d0 100644 --- a/pkgs/development/libraries/xmlsec/default.nix +++ b/pkgs/development/libraries/xmlsec/default.nix @@ -19,6 +19,6 @@ stdenv.mkDerivation rec { homepage = http://www.aleksey.com/xmlsec; description = "XML Security Library in C based on libxml2"; license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; + platforms = with stdenv.lib.platforms; linux ++ darwin; }; } diff --git a/pkgs/tools/security/oath-toolkit/default.nix b/pkgs/tools/security/oath-toolkit/default.nix index 8f96a5067d12..216ce3d23364 100644 --- a/pkgs/tools/security/oath-toolkit/default.nix +++ b/pkgs/tools/security/oath-toolkit/default.nix @@ -1,5 +1,10 @@ -{ stdenv, fetchurl, pam }: +{ stdenv, fetchurl, pam, xmlsec }: +let + securityDependency = + if stdenv.isDarwin then xmlsec + else pam; +in stdenv.mkDerivation rec { name = "oath-toolkit-2.4.1"; @@ -8,11 +13,12 @@ stdenv.mkDerivation rec { sha256 = "094vbq66sn5f2dsy14hajpsfdnaivjxf70xzs91nrsq0q75l5ylv"; }; - buildInputs = [ pam ]; + + buildInputs = [ securityDependency ]; meta = { homepage = http://www.nongnu.org/oath-toolkit/; description = "Components for building one-time password authentication systems"; - platforms = stdenv.lib.platforms.linux; + platforms = with stdenv.lib.platforms; linux ++ darwin; }; }