Merge branch 'staging' into staging-next
A few conflicts but relatively clear ones (I think).
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
{ lib, stdenv, fetchurl, pkg-config, udev, dbus, perl, python3, IOKit }:
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, perl
|
||||
, python3
|
||||
, dbus
|
||||
, polkit
|
||||
, systemd
|
||||
, IOKit
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pcsclite";
|
||||
@@ -13,14 +24,23 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./no-dropdir-literals.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i configure.ac \
|
||||
-e "s@polkit_policy_dir=.*@polkit_policy_dir=$bin/share/polkit-1/actions@"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--enable-confdir=/etc"
|
||||
# The OS should care on preparing the drivers into this location
|
||||
"--enable-usbdropdir=/var/lib/pcsc/drivers"
|
||||
"--enable-confdir=/etc"
|
||||
] ++ lib.optional stdenv.isLinux
|
||||
"--with-systemdsystemunitdir=\${out}/etc/systemd/system"
|
||||
++ lib.optional (!stdenv.isLinux)
|
||||
"--disable-libsystemd";
|
||||
]
|
||||
++ (if stdenv.isLinux then [
|
||||
"--enable-ipcdir=/run/pcscd"
|
||||
"--enable-polkit"
|
||||
"--with-systemdsystemunitdir=${placeholder "bin"}/lib/systemd/system"
|
||||
] else [
|
||||
"--disable-libsystemd"
|
||||
]);
|
||||
|
||||
postConfigure = ''
|
||||
sed -i -re '/^#define *PCSCLITE_HP_DROPDIR */ {
|
||||
@@ -33,10 +53,12 @@ stdenv.mkDerivation rec {
|
||||
moveToOutput bin/pcsc-spy "$dev"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config perl ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config perl ];
|
||||
|
||||
buildInputs = [ python3 ]
|
||||
++ lib.optionals stdenv.isLinux [ udev dbus ]
|
||||
++ lib.optionals stdenv.isLinux [ dbus polkit systemd ]
|
||||
++ lib.optionals stdenv.isDarwin [ IOKit ];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -1,18 +1,33 @@
|
||||
{ stdenv, lib, fetchurl, makeWrapper, pkg-config, udev, dbus, pcsclite
|
||||
, wget, coreutils, perlPackages
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, systemd
|
||||
, dbus
|
||||
, pcsclite
|
||||
, wget
|
||||
, coreutils
|
||||
, perlPackages
|
||||
}:
|
||||
|
||||
let deps = lib.makeBinPath [ wget coreutils ];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "pcsc-tools-1.5.7";
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pcsc-tools";
|
||||
version = "1.5.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/${name}.tar.bz2";
|
||||
url = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/${pname}-${version}.tar.bz2";
|
||||
sha256 = "17b9jxvcxmn007lavan20l25v4jvm6dqc4x9dlqzbg6mjs28zsp0";
|
||||
};
|
||||
|
||||
buildInputs = [ udev dbus perlPackages.perl pcsclite ];
|
||||
postPatch = ''
|
||||
substituteInPlace ATR_analysis \
|
||||
--replace /usr/local/pcsc /etc/pcsc \
|
||||
--replace /usr/share/pcsc $out/share/pcsc
|
||||
'';
|
||||
|
||||
buildInputs = [ dbus perlPackages.perl pcsclite ]
|
||||
++ lib.optional stdenv.isLinux systemd;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkg-config ];
|
||||
|
||||
@@ -24,14 +39,16 @@ in stdenv.mkDerivation rec {
|
||||
wrapProgram $out/bin/ATR_analysis \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl ]}"
|
||||
wrapProgram $out/bin/pcsc_scan \
|
||||
--set PATH "$out/bin:${deps}"
|
||||
--prefix PATH : "$out/bin:${lib.makeBinPath [ coreutils wget ]}"
|
||||
|
||||
install -Dm444 -t $out/share/pcsc smartcard_list.txt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools used to test a PC/SC driver, card or reader";
|
||||
homepage = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ];
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user