diff --git a/pkgs/tools/security/ccid/default.nix b/pkgs/tools/security/ccid/default.nix new file mode 100644 index 000000000000..896e034ee76b --- /dev/null +++ b/pkgs/tools/security/ccid/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, pcsclite, pkgconfig, libusb, perl}: +stdenv.mkDerivation { + name = "ccid-1.3.11"; + + src = fetchurl { + url = https://alioth.debian.org/frs/download.php/3080/ccid-1.3.11.tar.bz2; + sha256 = "01l9956wids087d38bprr8jqcl05j48cdp25k9q7vzran215mgzp"; + }; + + patchPhase = '' + sed -i 's,/usr/bin/env perl,${perl}/bin/perl,' src/*.pl + ''; + preConfigure = '' + configureFlags="$configureFlags --enable-usbdropdir=$out/pcsc/drivers" + ''; + + buildInputs = [ pcsclite pkgconfig libusb ]; + + meta = { + description = "ccid drivers for pcsclite"; + homepage = http://pcsclite.alioth.debian.org/; + license = "GPLv2+"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix new file mode 100644 index 000000000000..03924858e060 --- /dev/null +++ b/pkgs/tools/security/pcsclite/default.nix @@ -0,0 +1,25 @@ +{stdenv, fetchurl, hal, pkgconfig, dbus}: +stdenv.mkDerivation { + name = "pcsclite-1.5.5"; + + src = fetchurl { + url = https://alioth.debian.org/frs/download.php/3082/pcsc-lite-1.5.5.tar.bz2; + sha256 = "09pdf4dbzjh235zp6x7aiby266i7kmmmz6bjdyf9mzyyq7ryc785"; + }; + + # The OS should care on preparing the drivers into this location + configureFlags = [ "--enable-usbdropdir=/var/lib/pcsc/drivers" ]; + + preConfigure = '' + configureFlags="$configureFlags --enable-confdir=$out/etc" + ''; + buildInputs = [ hal pkgconfig dbus ]; + + meta = { + description = "Middleware to access a smart card using SCard API (PC/SC)"; + homepage = http://pcsclite.alioth.debian.org/; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 564bc7fbe982..af095d4c586c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -447,6 +447,10 @@ let inherit fetchurl stdenv; }; + ccid = import ../tools/security/ccid { + inherit fetchurl stdenv pcsclite libusb pkgconfig perl; + }; + ccrypt = import ../tools/security/ccrypt { inherit fetchurl stdenv; }; @@ -1197,6 +1201,10 @@ let inherit fetchurl stdenv zlib; }; + pcsclite = import ../tools/security/pcsclite { + inherit fetchurl stdenv hal pkgconfig dbus; + }; + pdf2djvu = import ../tools/typesetting/pdf2djvu { inherit fetchurl stdenv pkgconfig djvulibre poppler fontconfig libjpeg; };