2021-01-21 17:00:13 +00:00
|
|
|
{lib, 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
|
|
|
|
2021-06-22 13:21:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "scmccid";
|
|
|
|
version = "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 {
|
2021-06-22 13:21:29 +00:00
|
|
|
url = "http://www.scmmicro.com/support/download/scmccid_${version}_linux.tar.gz";
|
2010-01-12 19:22:22 +00:00
|
|
|
sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
|
|
|
|
})
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
|
2021-06-22 13:21:29 +00:00
|
|
|
url = "http://www.scmmicro.com/support/download/scmccid_${version}_linux_x64.tar.gz";
|
2010-01-12 19:22:22 +00:00
|
|
|
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";
|
2022-06-16 22:11:43 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.unfree;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = with lib.platforms; linux;
|
2010-01-12 19:22:22 +00:00
|
|
|
};
|
|
|
|
}
|