diff options
author | Andrew Childs <lorne@cons.org.nz> | 2019-05-03 17:08:40 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2019-05-04 00:46:12 +0900 |
commit | 4ad50e2cdce29d1b01004c005ed9966db2ea1dde (patch) | |
tree | 3ce1c2dc041d2442675f166cc20511e9ce57d532 /pkgs/tools/security | |
parent | 9dd83eb6577768da789589ff9826cd68e9b5ed0f (diff) |
opensc: use built-in PCSC provider on darwin
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/opensc/default.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix index 7d709712fc807..5f4108dc64296 100644 --- a/pkgs/tools/security/opensc/default.nix +++ b/pkgs/tools/security/opensc/default.nix @@ -1,7 +1,8 @@ { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, zlib, readline, openssl , libiconv, pcsclite, libassuan, libXt , docbook_xsl, libxslt, docbook_xml_dtd_412 -, Carbon +, Carbon, PCSC +, withApplePCSC ? stdenv.isDarwin }: stdenv.mkDerivation rec { @@ -17,9 +18,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ - autoreconfHook zlib readline openssl pcsclite libassuan + autoreconfHook zlib readline openssl libassuan libXt libxslt libiconv docbook_xml_dtd_412 - ] ++ stdenv.lib.optional stdenv.isDarwin Carbon; + ] + ++ stdenv.lib.optional stdenv.isDarwin Carbon + ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]); configureFlags = [ "--enable-zlib" @@ -32,9 +35,17 @@ stdenv.mkDerivation rec { "--localstatedir=/var" "--sysconfdir=/etc" "--with-xsl-stylesheetsdir=${docbook_xsl}/xml/xsl/docbook" - "--with-pcsc-provider=${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so" + "--with-pcsc-provider=${ + if withApplePCSC then + "${PCSC}/Library/Frameworks/PCSC.framework/PCSC" + else + "${stdenv.lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}" + }" ]; + PCSC_CFLAGS = stdenv.lib.optionalString withApplePCSC + "-I${PCSC}/Library/Frameworks/PCSC.framework/Headers"; + installFlags = [ "sysconfdir=$(out)/etc" "completiondir=$(out)/etc" |