From e4ce67615e8c228b446ce27fcef74d1f8dc48062 Mon Sep 17 00:00:00 2001 From: Peter Romfeld Date: Wed, 6 Dec 2017 11:51:28 +0800 Subject: [PATCH] softhsm: darwin support --- pkgs/tools/security/softhsm/default.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/softhsm/default.nix b/pkgs/tools/security/softhsm/default.nix index 6caf88973a61..ff3871bfbd96 100644 --- a/pkgs/tools/security/softhsm/default.nix +++ b/pkgs/tools/security/softhsm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, botan }: +{ stdenv, fetchurl, botan, libobjc, Security }: stdenv.mkDerivation rec { @@ -17,6 +17,9 @@ stdenv.mkDerivation rec { "--localstatedir=$out/var" ]; + propagatedBuildInputs = + stdenv.lib.optionals stdenv.isDarwin [ libobjc Security ]; + buildInputs = [ botan ]; postInstall = "rm -rf $out/var"; @@ -26,6 +29,6 @@ stdenv.mkDerivation rec { description = "Cryptographic store accessible through a PKCS #11 interface"; license = licenses.bsd2; maintainers = [ maintainers.leenaars ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7b29f4f9fc1d..9a0457bb0024 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4492,7 +4492,10 @@ with pkgs; sshguard = callPackage ../tools/security/sshguard {}; - softhsm = callPackage ../tools/security/softhsm { }; + softhsm = callPackage ../tools/security/softhsm { + inherit (darwin) libobjc; + inherit (darwin.apple_sdk.frameworks) Security; + }; solr = callPackage ../servers/search/solr { };