3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #60852 from thefloweringash/opensc-darwin

opensc: use built-in PCSC provider on darwin
This commit is contained in:
Renaud 2019-05-10 18:46:38 +02:00 committed by GitHub
commit 11fe4f3be0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 5 deletions

View file

@ -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"

View file

@ -4898,7 +4898,7 @@ in
openresolv = callPackage ../tools/networking/openresolv { };
opensc = callPackage ../tools/security/opensc {
inherit (darwin.apple_sdk.frameworks) Carbon;
inherit (darwin.apple_sdk.frameworks) Carbon PCSC;
};
opensm = callPackage ../tools/networking/opensm { };