diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/tools/security/pcsc-scm-scl011 | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/tools/security/pcsc-scm-scl011')
-rw-r--r-- | nixpkgs/pkgs/tools/security/pcsc-scm-scl011/default.nix | 48 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/security/pcsc-scm-scl011/eid.patch | 28 |
2 files changed, 76 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/pcsc-scm-scl011/default.nix b/nixpkgs/pkgs/tools/security/pcsc-scm-scl011/default.nix new file mode 100644 index 000000000000..88ca8a3d1b1a --- /dev/null +++ b/nixpkgs/pkgs/tools/security/pcsc-scm-scl011/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, unzip, libusb }: + +let + arch = if stdenv.hostPlatform.system == "i686-linux" then "32" + else if stdenv.hostPlatform.system == "x86_64-linux" then "64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; +in +stdenv.mkDerivation rec { + name = "pcsc-scm-scl-${version}"; + version = "2.09"; + + src = fetchurl { + url = "http://files.identiv.com/products/smart-card-readers/contactless/scl010-011/Linux_Driver_Ver${version}.zip"; + sha256 = "0ik26sxgqgsqplksl87z61vwmx51k7plaqmrkdid7xidgfhfxr42"; + }; + + buildInputs = [ unzip ]; + + unpackPhase = '' + unzip $src + tar xf "Linux Driver Ver${version}/sclgeneric_${version}_linux_${arch}bit.tar.gz" + export sourceRoot=$(readlink -e sclgeneric_${version}_linux_${arch}bit) + ''; + + # Add support for SCL011 nPA (subsidized model for German eID) + patches = [ ./eid.patch ]; + + installPhase = '' + mkdir -p $out/pcsc/drivers + cp -r proprietary/*.bundle $out/pcsc/drivers + ''; + + libPath = stdenv.lib.makeLibraryPath [ libusb ]; + + fixupPhase = '' + patchelf --set-rpath $libPath \ + $out/pcsc/drivers/SCLGENERIC.bundle/Contents/Linux/libSCLGENERIC.so.${version}; + ''; + + meta = with stdenv.lib; { + description = "SCM Microsystems SCL011 chipcard reader user space driver"; + homepage = http://www.scm-pc-card.de/index.php?lang=en&page=product&function=show_product&product_id=630; + downloadPage = https://support.identiv.com/scl010-scl011/; + license = licenses.unfreeRedistributable; + maintainers = with maintainers; [ sephalon ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/tools/security/pcsc-scm-scl011/eid.patch b/nixpkgs/pkgs/tools/security/pcsc-scm-scl011/eid.patch new file mode 100644 index 000000000000..6e7ffd60f72f --- /dev/null +++ b/nixpkgs/pkgs/tools/security/pcsc-scm-scl011/eid.patch @@ -0,0 +1,28 @@ +diff --git a/proprietary/SCLGENERIC.bundle/Contents/Info.plist b/proprietary/SCLGENERIC.bundle/Contents/Info.plist +index 412d6b9..5d1c6cc 100755 +--- a/proprietary/SCLGENERIC.bundle/Contents/Info.plist ++++ b/proprietary/SCLGENERIC.bundle/Contents/Info.plist +@@ -34,6 +34,7 @@ + <string>0x04E6</string> + <string>0x04E6</string> + <string>0x04E6</string> ++ <string>0x04E6</string> + </array> + + <key>ifdProductID</key> +@@ -42,6 +43,7 @@ + <string>0x5291</string> + <string>0x5290</string> + <string>0x5293</string> ++ <string>0x5292</string> + </array> + + <key>ifdFriendlyName</key> +@@ -50,6 +52,7 @@ + <string>SCL010 Contactless Reader</string> + <string>SCR331CL-NTTCom</string> + <string>SCL011G Contactless Reader</string> ++ <string>SCM Microsystems, Inc. SCL011 RFID reader</string> + </array> + + </dict> |