From 1438ff7e5fc7d321262800b4cdc6d1fab02e28ce Mon Sep 17 00:00:00 2001 From: kyehn <228304369+kyehn@users.noreply.github.com> Date: Fri, 3 Oct 2025 20:54:42 +0800 Subject: [PATCH] scmccid: 5.0.11 -> 5.0.35 --- pkgs/by-name/sc/scmccid/package.nix | 31 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/sc/scmccid/package.nix b/pkgs/by-name/sc/scmccid/package.nix index 684c8116fc72..6c9b0922318a 100644 --- a/pkgs/by-name/sc/scmccid/package.nix +++ b/pkgs/by-name/sc/scmccid/package.nix @@ -6,22 +6,20 @@ libusb-compat-0_1, }: -assert stdenv ? cc && stdenv.cc.libc != null; - -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "scmccid"; - version = "5.0.11"; + version = "5.0.35"; src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { - url = "http://www.scmmicro.com/support/download/scmccid_${version}_linux.tar.gz"; - sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm"; + url = "https://scm-pc-card.de/file/driver/Readers_Writers/scmccid_${finalAttrs.version}_linux_rel.tar.gz"; + hash = "sha256-eRqAoe7uZUTTLh3K3bc4PmVmqJtvSpfOBWXdjydN72U="; }) else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { - url = "http://www.scmmicro.com/support/download/scmccid_${version}_linux_x64.tar.gz"; - sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i"; + url = "https://scm-pc-card.de/file/driver/Readers_Writers/scmccid_${finalAttrs.version}_linux_rel_64.tar.gz"; + hash = "sha256-SFf3QC+1hZCWIgIOEAfIHR68PHFXTW8amT4D5UMTMeQ="; }) else throw "Architecture not supported"; @@ -29,24 +27,31 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ patchelf ]; installPhase = '' - RPATH=${libusb-compat-0_1.out}/lib:${stdenv.cc.libc.out}/lib + runHook preInstall for a in proprietary/*/Contents/Linux/*.so*; do if ! test -L $a; then - patchelf --set-rpath $RPATH $a + patchelf --set-rpath ${ + lib.makeLibraryPath [ + libusb-compat-0_1 + stdenv.cc.libc + ] + } $a fi done mkdir -p $out/pcsc/drivers cp -R proprietary/* $out/pcsc/drivers + + runHook postInstall ''; meta = { - homepage = "http://www.scmmicro.com/support/pc-security-support/downloads.html"; + homepage = "http://support.identiv.com/products"; description = "PCSC drivers for linux, for the SCM SCR3310 v2.0 card and others"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; license = lib.licenses.unfree; maintainers = [ ]; - platforms = with lib.platforms; linux; + platforms = lib.platforms.linux; }; -} +})