2010-01-12 19:22:22 +00:00
|
|
|
{stdenv, fetchurl, patchelf, libusb}:
|
|
|
|
|
2014-12-17 18:11:30 +00:00
|
|
|
assert stdenv ? cc && stdenv.cc.libc != null;
|
2010-01-29 00:17:59 +00:00
|
|
|
|
2010-01-12 19:22:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "scmccid-5.0.11";
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2018-08-20 20:11:29 +01: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 20:11:29 +01: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 22:38:10 +01:00
|
|
|
nativeBuildInputs = [ patchelf ];
|
2010-01-12 19:22:22 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-01-24 07:29:45 +00:00
|
|
|
RPATH=${libusb.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 = {
|
|
|
|
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 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;
|
|
|
|
};
|
|
|
|
}
|