forked from mirrors/nixpkgs
opensc-dnie lib & wrapper: remove dead packages
Last updated in 2010, broken since 2013. cc @viric
This commit is contained in:
parent
fea720f773
commit
2357918b00
|
@ -1,53 +0,0 @@
|
|||
{ stdenv, fetchurl, writeScript, patchelf, glib, opensc, openssl, openct
|
||||
, libtool, pcsclite, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libopensc-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.cc.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/"*
|
||||
|
||||
mkdir -p $out
|
||||
cp -R usr/lib $out
|
||||
cp -R usr/share $out
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# This will help keeping the proper opensc version when using this libopensc-dnie library
|
||||
inherit opensc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://www.dnielectronico.es/descargas/;
|
||||
description = "Opensc plugin to access the Spanish national ID smartcard";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
broken = true;
|
||||
};
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
{stdenv, makeWrapper, ed, libopensc_dnie}:
|
||||
|
||||
let
|
||||
opensc = libopensc_dnie.opensc;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${opensc.name}-dnie-wrapper";
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/etc
|
||||
cp ${opensc}/etc/opensc.conf $out/etc
|
||||
chmod +w $out/etc/opensc.conf
|
||||
|
||||
# NOTE: The libopensc-dnie.so driver requires /usr/bin/pinentry available, to sign
|
||||
|
||||
${ed}/bin/ed $out/etc/opensc.conf << EOF
|
||||
/card_drivers
|
||||
a
|
||||
card_drivers = dnie;
|
||||
card_driver dnie {
|
||||
module = ${libopensc_dnie}/lib/libopensc-dnie.so;
|
||||
}
|
||||
.
|
||||
w
|
||||
q
|
||||
EOF
|
||||
|
||||
# Disable pkcs15 file caching, otherwise the card does not work
|
||||
sed -i 's/use_caching = true/use_caching = false/' $out/etc/opensc.conf
|
||||
|
||||
for a in ${opensc}/bin/*; do
|
||||
makeWrapper $a $out/bin/`basename $a` \
|
||||
--set OPENSC_CONF $out/etc/opensc.conf
|
||||
done
|
||||
|
||||
# Special wrapper for pkcs11-tool, which needs an additional parameter
|
||||
rm $out/bin/pkcs11-tool
|
||||
makeWrapper ${opensc}/bin/pkcs11-tool $out/bin/pkcs11-tool \
|
||||
--set OPENSC_CONF $out/etc/opensc.conf \
|
||||
--add-flags "--module ${opensc}/lib/opensc-pkcs11.so"
|
||||
|
||||
# Add, as bonus, a wrapper for the firefox in the PATH, that loads the
|
||||
# proper opensc configuration.
|
||||
cat > $out/bin/firefox-dnie << EOF
|
||||
#!${stdenv.shell}
|
||||
export OPENSC_CONF=$out/etc/opensc.conf
|
||||
exec firefox
|
||||
EOF
|
||||
chmod +x $out/bin/firefox-dnie
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Access to the opensc tools and firefox using the Spanish national ID SmartCard";
|
||||
longDescription = ''
|
||||
Opensc needs a special configuration and special drivers to use the SmartCard
|
||||
the Spanish government provides to the citizens as ID card.
|
||||
Some wrapper scripts take care for the proper opensc configuration to be used, in order
|
||||
to access the certificates in the SmartCard through the opensc tools or firefox.
|
||||
Opensc will require a pcscd daemon running, managing the access to the card reader.
|
||||
'';
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
};
|
||||
}
|
|
@ -2559,8 +2559,6 @@ let
|
|||
|
||||
opensc = callPackage ../tools/security/opensc { };
|
||||
|
||||
opensc_dnie_wrapper = callPackage ../tools/security/opensc-dnie-wrapper { };
|
||||
|
||||
openssh =
|
||||
callPackage ../tools/networking/openssh {
|
||||
hpnSupport = false;
|
||||
|
@ -7991,8 +7989,6 @@ let
|
|||
|
||||
openldap = callPackage ../development/libraries/openldap { };
|
||||
|
||||
libopensc_dnie = callPackage ../development/libraries/libopensc-dnie { };
|
||||
|
||||
opencolorio = callPackage ../development/libraries/opencolorio { };
|
||||
|
||||
ois = callPackage ../development/libraries/ois {};
|
||||
|
|
Loading…
Reference in a new issue