summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-06-21 12:40:15 +0200
committerJan Tojnar <jtojnar@gmail.com>2018-06-29 04:40:54 +0200
commit3784fd5e46064408c73701edc1bed34c3ba37838 (patch)
tree8198a92eee53fc16ac84134988edad349dd2351d
parent1cd096a1f0bf541fd16d2bd24b62f20dc2348faf (diff)
pcsclite: split package
-rw-r--r--nixos/modules/services/hardware/pcscd.nix4
-rw-r--r--pkgs/applications/misc/yubioath-desktop/default.nix2
-rw-r--r--pkgs/applications/networking/remote/freerdp/default.nix2
-rw-r--r--pkgs/applications/office/moneyplex/default.nix6
-rw-r--r--pkgs/development/python-modules/pyscard/default.nix4
-rw-r--r--pkgs/development/tools/hexio/default.nix2
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/default.nix4
-rw-r--r--pkgs/tools/security/gnupg/20.nix2
-rw-r--r--pkgs/tools/security/gnupg/22.nix2
-rw-r--r--pkgs/tools/security/open-ecard/default.nix2
-rw-r--r--pkgs/tools/security/opensc/default.nix2
-rw-r--r--pkgs/tools/security/pcsclite/default.nix7
-rw-r--r--pkgs/top-level/perl-packages.nix2
13 files changed, 24 insertions, 17 deletions
diff --git a/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix
index fa97e8bf746b..f3fc4c3cc79e 100644
--- a/nixos/modules/services/hardware/pcscd.nix
+++ b/nixos/modules/services/hardware/pcscd.nix
@@ -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";
};
};
};
diff --git a/pkgs/applications/misc/yubioath-desktop/default.nix b/pkgs/applications/misc/yubioath-desktop/default.nix
index 3d12fc037107..db48c2e7c808 100644
--- a/pkgs/applications/misc/yubioath-desktop/default.nix
+++ b/pkgs/applications/misc/yubioath-desktop/default.nix
@@ -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
diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix
index 872d9b018ff7..ad4a8849fac3 100644
--- a/pkgs/applications/networking/remote/freerdp/default.nix
+++ b/pkgs/applications/networking/remote/freerdp/default.nix
@@ -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; [
diff --git a/pkgs/applications/office/moneyplex/default.nix b/pkgs/applications/office/moneyplex/default.nix
index 4530305ee12e..31de4db76f1a 100644
--- a/pkgs/applications/office/moneyplex/default.nix
+++ b/pkgs/applications/office/moneyplex/default.nix
@@ -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
diff --git a/pkgs/development/python-modules/pyscard/default.nix b/pkgs/development/python-modules/pyscard/default.nix
index 3290fb74fa18..4784e46ffb21 100644
--- a/pkgs/development/python-modules/pyscard/default.nix
+++ b/pkgs/development/python-modules/pyscard/default.nix
@@ -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;
diff --git a/pkgs/development/tools/hexio/default.nix b/pkgs/development/tools/hexio/default.nix
index 7078e2a37271..6511bdd20102 100644
--- a/pkgs/development/tools/hexio/default.nix
+++ b/pkgs/development/tools/hexio/default.nix
@@ -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/'
'';
diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix
index c2c05a6b99ed..3dce750d255e 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/default.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix
@@ -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 ];
diff --git a/pkgs/tools/security/gnupg/20.nix b/pkgs/tools/security/gnupg/20.nix
index fdef447193d8..9404cb1d0655 100644
--- a/pkgs/tools/security/gnupg/20.nix
+++ b/pkgs/tools/security/gnupg/20.nix
@@ -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/'
'' + ''
diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix
index f28d57fa62bd..b0381b32bcfe 100644
--- a/pkgs/tools/security/gnupg/22.nix
+++ b/pkgs/tools/security/gnupg/22.nix
@@ -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";
diff --git a/pkgs/tools/security/open-ecard/default.nix b/pkgs/tools/security/open-ecard/default.nix
index a0af51186edf..98f2e56e7497 100644
--- a/pkgs/tools/security/open-ecard/default.nix
+++ b/pkgs/tools/security/open-ecard/default.nix
@@ -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; {
diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix
index 819c01a0893f..7624e6cfa39e 100644
--- a/pkgs/tools/security/opensc/default.nix
+++ b/pkgs/tools/security/opensc/default.nix
@@ -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 = [
diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix
index bf5856aec357..f46e3f22ecd1 100644
--- a/pkgs/tools/security/pcsclite/default.nix
+++ b/pkgs/tools/security/pcsclite/default.nix
@@ -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 ];
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 021a6e4a281b..1d5a0d8ef34f 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -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 = {