2010-01-12 20:22:22 +01:00
|
|
|
{stdenv, fetchurl, patchelf, libusb}:
|
|
|
|
|
2014-12-17 19:11:30 +01:00
|
|
|
assert stdenv ? cc && stdenv.cc.libc != null;
|
2010-01-29 01:17:59 +01:00
|
|
|
|
2010-01-12 20:22:22 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "scmccid-5.0.11";
|
2014-11-06 01:44:33 +01:00
|
|
|
|
2010-01-29 09:04:31 +01:00
|
|
|
src = if stdenv.system == "i686-linux" then (fetchurl {
|
2010-01-12 20:22:22 +01:00
|
|
|
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
|
|
|
|
sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
|
|
|
|
})
|
2010-01-29 09:04:31 +01:00
|
|
|
else if stdenv.system == "x86_64-linux" then (fetchurl {
|
2010-01-12 20:22:22 +01:00
|
|
|
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
|
|
|
|
sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
|
|
|
|
})
|
|
|
|
else throw "Architecture not supported";
|
|
|
|
|
|
|
|
buildInputs = [ patchelf ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-12-17 19:11:30 +01:00
|
|
|
RPATH=${libusb}/lib:${stdenv.cc.libc}/lib
|
2010-01-12 20:22:22 +01:00
|
|
|
|
|
|
|
for a in proprietary/*/Contents/Linux/*.so*; do
|
|
|
|
if ! test -L $a; then
|
|
|
|
patchelf --set-rpath $RPATH $a
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/pcsc/drivers
|
2010-01-12 20:22:22 +01: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 01:44:33 +01:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2010-01-12 20:22:22 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|