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