pcsclite: split package
This commit is contained in:
parent
1cd096a1f0
commit
3784fd5e46
|
@ -61,8 +61,8 @@ in {
|
|||
description = "PCSC-Lite daemon";
|
||||
environment.PCSCLITE_HP_DROPDIR = pluginEnv;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.pcsclite}/sbin/pcscd -f -x -c ${cfgFile}";
|
||||
ExecReload = "${pkgs.pcsclite}/sbin/pcscd -H";
|
||||
ExecStart = "${getBin pkgs.pcsclite}/sbin/pcscd -f -x -c ${cfgFile}";
|
||||
ExecReload = "${getBin pkgs.pcsclite}/sbin/pcscd -H";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ python27Packages.buildPythonApplication rec {
|
|||
|
||||
# Need LD_PRELOAD for libykpers as the Nix cpython disables ctypes.cdll.LoadLibrary
|
||||
# support that the yubicommon library uses to load libykpers
|
||||
makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"'';
|
||||
makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/applications
|
||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
|||
--replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
|
||||
'' + lib.optionalString (pcsclite != null) ''
|
||||
substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \
|
||||
--replace "libpcsclite.so" "${pcsclite}/lib/libpcsclite.so"
|
||||
--replace "libpcsclite.so" "${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so"
|
||||
'';
|
||||
|
||||
buildInputs = with lib; [
|
||||
|
|
|
@ -62,14 +62,14 @@ stdenv.mkDerivation rec {
|
|||
if [ ! -d "\$MDIR/pcsc" ]; then
|
||||
${coreutils}/bin/mkdir -p \$MDIR/pcsc
|
||||
fi
|
||||
if [ ! -e "\$MDIR/pcsc/libpcsclite.so.1" ] || [ ! \`${coreutils}/bin/readlink -f "\$MDIR/pcsc/libpcsclite.so.1"\` -ef "${pcsclite}/lib/libpcsclite.so.1" ]; then
|
||||
${coreutils}/bin/ln -sf "${pcsclite}/lib/libpcsclite.so.1" "\$MDIR/pcsc/libpcsclite.so.1"
|
||||
if [ ! -e "\$MDIR/pcsc/libpcsclite.so.1" ] || [ ! \`${coreutils}/bin/readlink -f "\$MDIR/pcsc/libpcsclite.so.1"\` -ef "${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1" ]; then
|
||||
${coreutils}/bin/ln -sf "${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1" "\$MDIR/pcsc/libpcsclite.so.1"
|
||||
fi
|
||||
|
||||
|
||||
if [ -e "\$MDIR/rup/rupremote.lst" ]; then
|
||||
for i in \`${coreutils}/bin/cat "\$MDIR/rup/rupremote.lst"\`; do
|
||||
${coreutils}/bin/mv "\$MDIR/rup/"\`${coreutils}/bin/basename \$i\` "\$MDIR/\$i"
|
||||
${coreutils}/bin/mv "\$MDIR/rup/"\`${coreutils}/bin/basename \$i\` "\$MDIR/\$i"
|
||||
done
|
||||
rm -r "\$MDIR/rup/rupremote.lst"
|
||||
fi
|
||||
|
|
|
@ -10,11 +10,11 @@ buildPythonPackage rec {
|
|||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -e 's!"libpcsclite\.so\.1"!"${pcsclite}/lib/libpcsclite.so.1"!' \
|
||||
sed -e 's!"libpcsclite\.so\.1"!"${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1"!' \
|
||||
-i smartcard/scard/winscarddll.c
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-isystem ${pcsclite}/include/PCSC/";
|
||||
NIX_CFLAGS_COMPILE = "-isystem ${stdenv.lib.getDev pcsclite}/include/PCSC/";
|
||||
|
||||
propagatedBuildInputs = [ pcsclite ];
|
||||
buildInputs = [ swig ] ++ stdenv.lib.optional stdenv.isDarwin PCSC;
|
||||
|
|
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patchPhase = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace '-I/usr/local/include/PCSC/' '-I${pcsclite}/include/PCSC/' \
|
||||
--replace '-I/usr/local/include/PCSC/' '-I${stdenv.lib.getDev pcsclite}/include/PCSC/' \
|
||||
--replace '-L/usr/local/lib/pth' '-I${pth}/lib/'
|
||||
'';
|
||||
|
||||
|
|
|
@ -70,8 +70,8 @@ stdenv.mkDerivation rec {
|
|||
cat -n .config
|
||||
substituteInPlace Makefile --replace /usr/local $out
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE \
|
||||
-I$(echo "${libnl.dev}"/include/libnl*/) \
|
||||
-I${pcsclite}/include/PCSC/"
|
||||
-I$(echo "${stdenv.lib.getDev libnl}"/include/libnl*/) \
|
||||
-I${stdenv.lib.getDev pcsclite}/include/PCSC/"
|
||||
'';
|
||||
|
||||
buildInputs = [ openssl libnl dbus_libs readline pcsclite ];
|
||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
|||
prePatch = ''
|
||||
find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i
|
||||
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
||||
sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
|
||||
sed -i 's,"libpcsclite\.so[^"]*","${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
find . -name pcsc-wrapper.c | xargs sed -i 's/typedef unsinged int pcsc_dword_t/typedef unsigned int pcsc_dword_t/'
|
||||
'' + ''
|
||||
|
|
|
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
./fix-libusb-include-path.patch
|
||||
];
|
||||
postPatch = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
|
||||
sed -i 's,"libpcsclite\.so[^"]*","${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
|
||||
''; #" fix Emacs syntax highlighting :-(
|
||||
|
||||
pinentryBinaryPath = pinentry.binaryPath or "bin/pinentry";
|
||||
|
|
|
@ -50,7 +50,7 @@ in stdenv.mkDerivation rec {
|
|||
makeWrapper ${jre}/bin/java $out/bin/${appName} \
|
||||
--add-flags "-cp $out/share/java/cifs-${version}.jar" \
|
||||
--add-flags "-jar $out/share/java/richclient-${version}.jar" \
|
||||
--suffix LD_LIBRARY_PATH ':' ${pcsclite}/lib
|
||||
--suffix LD_LIBRARY_PATH ':' ${stdenv.lib.getLib pcsclite}/lib
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-xsl-stylesheetsdir=${docbook_xsl}/xml/xsl/docbook"
|
||||
"--with-pcsc-provider=${pcsclite}/lib/libpcsclite.so"
|
||||
"--with-pcsc-provider=${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so"
|
||||
];
|
||||
|
||||
installFlags = [
|
||||
|
|
|
@ -5,6 +5,8 @@ stdenv.mkDerivation rec {
|
|||
name = "pcsclite-${version}";
|
||||
version = "1.8.23";
|
||||
|
||||
outputs = [ "bin" "out" "dev" "doc" "man" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pcsclite.apdu.fr/files/pcsc-lite-${version}.tar.bz2";
|
||||
sha256 = "1jc9ws5ra6v3plwraqixin0w0wfxj64drahrbkyrrwzghqjjc9ss";
|
||||
|
@ -28,6 +30,11 @@ stdenv.mkDerivation rec {
|
|||
}' config.h
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# pcsc-spy is a debugging utility and it drags python into the closure
|
||||
moveToOutput bin/pcsc-spy "$dev"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig perl python2 ];
|
||||
buildInputs = stdenv.lib.optionals stdenv.isLinux [ udev dbus_libs ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ IOKit ];
|
||||
|
|
|
@ -11993,7 +11993,7 @@ let self = _self // overrides; _self = with self; {
|
|||
};
|
||||
buildInputs = [ pkgs.pcsclite ];
|
||||
nativeBuildInputs = [ pkgs.pkgconfig ];
|
||||
NIX_CFLAGS_LINK = "-L${pkgs.pcsclite}/lib -lpcsclite";
|
||||
NIX_CFLAGS_LINK = "-L${stdenv.lib.getLib pkgs.pcsclite}/lib -lpcsclite";
|
||||
# tests fail; look unfinished
|
||||
doCheck = false;
|
||||
meta = {
|
||||
|
|
Loading…
Reference in a new issue