mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
Downgrading the opensc library version to 0.11.7, that required
for the Spanish national id smartcard (DNIe). Adding the opensc dnie driver. svn path=/nixpkgs/trunk/; revision=19325
This commit is contained in:
parent
000e1c7c22
commit
24a46bbf12
21
pkgs/development/libraries/openct/default.nix
Normal file
21
pkgs/development/libraries/openct/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{stdenv, fetchurl, libtool, pcsclite, libusb, pkgconfig}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "openct-0.6.19";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.opensc-project.org/files/openct/${name}.tar.gz";
|
||||
sha256 = "1y4jlr877g3lziq7i3p6pdkscqpkn1lld874q6r2hsvc39n7c88z";
|
||||
};
|
||||
|
||||
configureFlags = [ "--enable-usb" "--enable-pcsc" ];
|
||||
buildInputs = [ libtool pcsclite libusb pkgconfig ];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.opensc-project.org/openct/;
|
||||
license = "LGPL";
|
||||
description = "Drivers for several smart card readers";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
49
pkgs/development/libraries/opensc-dnie/default.nix
Normal file
49
pkgs/development/libraries/opensc-dnie/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{stdenv, fetchurl, writeScript, patchelf, glib, opensc, openssl, openct, libtool, pcsclite,
|
||||
zlib}:
|
||||
|
||||
# Version 1.4.6-2 works only with opensc 0.11.7
|
||||
assert opensc.name == "opensc-0.11.7";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "opensc-dnie-1.4.6-2";
|
||||
|
||||
src = if (stdenv.system == "i686-linux") then (fetchurl {
|
||||
url = http://www.dnielectronico.es/descargas/PKCS11_para_Sistemas_Unix/1.4.6.Ubuntu_Jaunty_32/Ubuntu_Jaunty_opensc-dnie_1.4.6-2_i386.deb.tar;
|
||||
sha256 = "1i6r9ahjr0rkcxjfzkg2rrib1rjsjd5raxswvvfiya98q8rlv39i";
|
||||
})
|
||||
else if (stdenv.system == "x86_64-linux") then (fetchurl { url = http://www.dnielectronico.es/descargas/PKCS11_para_Sistemas_Unix/1.4.6.Ubuntu_Jaunty_64/Ubuntu_Jaunty_opensc-dnie_1.4.6-2_amd64.deb.tar;
|
||||
sha256 = "1py2bxavdcj0crhk1lwqzjgya5lvyhdfdbr4g04iysj56amxb7f9";
|
||||
})
|
||||
else throw "Architecture not supported";
|
||||
|
||||
buildInputs = [ patchelf glib ];
|
||||
|
||||
builder = writeScript (name + "-builder.sh") ''
|
||||
source $stdenv/setup
|
||||
tar xf $src
|
||||
ar x opensc-dnie*
|
||||
tar xf data.tar.gz
|
||||
|
||||
RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.gcc.libc}/lib:${zlib}/lib
|
||||
|
||||
for a in usr/lib/*.so*; do
|
||||
if ! test -L $a; then
|
||||
patchelf --set-rpath $RPATH $a
|
||||
fi
|
||||
done
|
||||
|
||||
sed -i s,/usr,$out, usr/lib/pkgconfig/*
|
||||
|
||||
ensureDir $out
|
||||
cp -R usr/lib $out
|
||||
cp -R usr/share $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.dnielectronico.es/descargas/;
|
||||
description = "Opensc plugin to access the Spanish national ID smartcard";
|
||||
license = "nonfree";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
|
@ -1,15 +1,17 @@
|
|||
{stdenv, fetchurl, libtool, readline, zlib, openssl, libiconv, pcsclite, libassuan, pkgconfig,
|
||||
libXt }:
|
||||
libXt}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "opensc-0.11.12";
|
||||
name = "opensc-0.11.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.opensc-project.org/files/opensc/${name}.tar.gz";
|
||||
sha256 = "0zr04qadk9gsabmhnwmk27kb4zgfpy988nwa9s1k3hc3hn3gls3a";
|
||||
sha256 = "0781qi0bsm01wdhkb1vd3ra9wkwgyjcm2w87jb2r53msply2gavd";
|
||||
};
|
||||
|
||||
configureFlags = [ "--enable-pcsc" "--enable-nsplugin"
|
||||
"--with-pcsc-provider=${pcsclite}/lib/libpcsclite.so.1" ];
|
||||
|
||||
buildInputs = [ libtool readline zlib openssl pcsclite libassuan pkgconfig
|
||||
libXt ] ++
|
||||
stdenv.lib.optional (! stdenv.isLinux) libiconv;
|
|
@ -1162,12 +1162,14 @@ let
|
|||
inherit fetchurl stdenv pkgconfig bluez libusb;
|
||||
};
|
||||
|
||||
opensc = import ../tools/security/opensc {
|
||||
opensc_0_11_7 = import ../tools/security/opensc/0.11.7.nix {
|
||||
inherit fetchurl stdenv libtool readline zlib openssl libiconv pcsclite
|
||||
libassuan pkgconfig;
|
||||
inherit (xlibs) libXt;
|
||||
};
|
||||
|
||||
opensc = opensc_0_11_7;
|
||||
|
||||
openssh = import ../tools/networking/openssh {
|
||||
inherit fetchurl stdenv zlib openssl pam perl;
|
||||
pamSupport = getPkgConfig "openssh" "pam" true;
|
||||
|
@ -4331,6 +4333,10 @@ let
|
|||
inherit fetchurl stdenv mesa qt4 tcl tk;
|
||||
};
|
||||
|
||||
openct = import ../development/libraries/openct {
|
||||
inherit fetchurl stdenv libtool pcsclite libusb pkgconfig;
|
||||
};
|
||||
|
||||
# this ctl version is needed by openexr_viewers
|
||||
openexr_ctl = import ../development/libraries/openexr_ctl {
|
||||
inherit fetchurl stdenv ilmbase ctl;
|
||||
|
@ -4360,6 +4366,13 @@ let
|
|||
pkgconfig;
|
||||
};
|
||||
|
||||
opensc_dnie = import ../development/libraries/opensc-dnie {
|
||||
inherit fetchurl stdenv patchelf writeScript openssl openct
|
||||
libtool pcsclite zlib;
|
||||
inherit (gtkLibs) glib;
|
||||
opensc = opensc_0_11_7;
|
||||
};
|
||||
|
||||
openssl = import ../development/libraries/openssl {
|
||||
fetchurl = fetchurlBoot;
|
||||
inherit stdenv perl;
|
||||
|
|
Loading…
Reference in a new issue