diff options
author | Renaud <c0bw3b@users.noreply.github.com> | 2019-05-10 18:46:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-10 18:46:38 +0200 |
commit | 11fe4f3be003f9679b56aae3754c9039cb5fe0b6 (patch) | |
tree | 67fe9fefbce4600482dc78d6d648524a1bec0f23 /pkgs/tools/security/opensc | |
parent | 4b7aea9e8cd17bbabaea70400b50af4e8140c696 (diff) | |
parent | 4ad50e2cdce29d1b01004c005ed9966db2ea1dde (diff) |
Merge pull request #60852 from thefloweringash/opensc-darwin
opensc: use built-in PCSC provider on darwin
Diffstat (limited to 'pkgs/tools/security/opensc')
-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 3144665e4ec98..5170805e3f642 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 ]); NIX_CFLAGS_COMPILE = "-Wno-error"; @@ -34,9 +37,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" |