mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 17:25:11 +00:00
eb91037e7b
In a few cases it wasn't clear so I left them as-is. While visiting these moved other things to nativeBuildInputs when it was clear they were one of these cases: * makeWrapper * archive utilities (in order to unpack src) * a few of these might no longer be needed but leaving for another day
41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
{stdenv, fetchurl, patchelf, libusb}:
|
|
|
|
assert stdenv ? cc && stdenv.cc.libc != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "scmccid-5.0.11";
|
|
|
|
src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
|
|
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
|
|
sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
|
|
})
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
|
|
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
|
|
sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
|
|
})
|
|
else throw "Architecture not supported";
|
|
|
|
nativeBuildInputs = [ patchelf ];
|
|
|
|
installPhase = ''
|
|
RPATH=${libusb.out}/lib:${stdenv.cc.libc.out}/lib
|
|
|
|
for a in proprietary/*/Contents/Linux/*.so*; do
|
|
if ! test -L $a; then
|
|
patchelf --set-rpath $RPATH $a
|
|
fi
|
|
done
|
|
|
|
mkdir -p $out/pcsc/drivers
|
|
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";
|
|
license = stdenv.lib.licenses.unfree;
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
};
|
|
}
|