2020-04-28 03:29:39 +00:00
|
|
|
{stdenv, fetchurl, patchelf, libusb-compat-0_1}:
|
2010-01-12 19:22:22 +00:00
|
|
|
|
2014-12-17 18:11:30 +00:00
|
|
|
assert stdenv ? cc && stdenv.cc.libc != null;
|
2010-01-29 00:17:59 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2010-01-12 19:22:22 +00:00
|
|
|
name = "scmccid-5.0.11";
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2018-08-20 19:11:29 +00:00
|
|
|
src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
|
2010-01-12 19:22:22 +00:00
|
|
|
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
|
|
|
|
sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
|
|
|
|
})
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
|
2010-01-12 19:22:22 +00:00
|
|
|
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
|
|
|
|
sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
|
|
|
|
})
|
|
|
|
else throw "Architecture not supported";
|
|
|
|
|
2018-09-27 21:38:10 +00:00
|
|
|
nativeBuildInputs = [ patchelf ];
|
2010-01-12 19:22:22 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2020-04-28 03:29:39 +00:00
|
|
|
RPATH=${libusb-compat-0_1.out}/lib:${stdenv.cc.libc.out}/lib
|
2010-01-12 19:22:22 +00:00
|
|
|
|
|
|
|
for a in proprietary/*/Contents/Linux/*.so*; do
|
|
|
|
if ! test -L $a; then
|
|
|
|
patchelf --set-rpath $RPATH $a
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/pcsc/drivers
|
2010-01-12 19:22:22 +00:00
|
|
|
cp -R proprietary/* $out/pcsc/drivers
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.scmmicro.com/support/pc-security-support/downloads.html";
|
2010-01-12 19:22:22 +00:00
|
|
|
description = "PCSC drivers for linux, for the SCM SCR3310 v2.0 card and others";
|
2014-11-06 00:44:33 +00:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2010-01-12 19:22:22 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|