From aed907112c7108a25ff9a7bb9a29e9205217ae64 Mon Sep 17 00:00:00 2001 From: Charles Duffy Date: Mon, 27 Mar 2023 12:55:52 -0500 Subject: [PATCH] pcsc-safenet: switch from fetchurl to fetchzip --- pkgs/tools/security/pcsc-safenet/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/security/pcsc-safenet/default.nix b/pkgs/tools/security/pcsc-safenet/default.nix index be86f9cd643d..c424dfb32667 100644 --- a/pkgs/tools/security/pcsc-safenet/default.nix +++ b/pkgs/tools/security/pcsc-safenet/default.nix @@ -1,7 +1,7 @@ { stdenv , lib , runCommand -, fetchurl +, fetchzip , autoPatchelfHook , dpkg , gtk3 @@ -14,24 +14,22 @@ stdenv.mkDerivation rec { pname = "pcsc-safenet"; version = "10.8.28"; + debName = "Installation/Standard/Ubuntu-2004/safenetauthenticationclient_${version}_amd64.deb"; + # extract debian package from larger zip file - src = runCommand "sac.deb" { - zipSrc = let + src = + let versionWithUnderscores = builtins.replaceStrings ["."] ["_"] version; - in fetchurl { + in fetchzip { url = "https://www.digicert.com/StaticFiles/SAC_${versionWithUnderscores}_GA_Build.zip"; - hash = "sha256-bh+TB7ZGDMh9G4lcPtv7mc0XeGhmCfMMqrlqtyGIIaA="; + hash = "sha256-7XWj3T9/KnmgQ05urOJV6dqgkAS/A2G7efnqjQO2ing="; }; - debName = "SAC ${version} GA Build/Installation/Standard/Ubuntu-2004/safenetauthenticationclient_${version}_amd64.deb"; - } '' - ${unzip}/bin/unzip -p "$zipSrc" "$debName" >"$out" - ''; dontBuild = true; dontConfigure = true; unpackPhase = '' - dpkg-deb -x $src . + dpkg-deb -x "$src/$debName" . ''; buildInputs = [