From bfa29fba8fbb34f7a5ae5ac070817278d26bd32f Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 4 Apr 2024 05:09:18 -0700 Subject: [PATCH] python3Packages.asn1crypto: use `let .. in` instead of top-level `with` (#300734) --- .../python-modules/asn1crypto/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/asn1crypto/default.nix b/pkgs/development/python-modules/asn1crypto/default.nix index 426116f5775a..a10ad81c1823 100644 --- a/pkgs/development/python-modules/asn1crypto/default.nix +++ b/pkgs/development/python-modules/asn1crypto/default.nix @@ -13,8 +13,8 @@ # Switch version based on python version, as the situation isn't easy: # https://github.com/wbond/asn1crypto/issues/269 # https://github.com/MatthiasValvekens/certomancer/issues/12 -with ( - if lib.versionOlder python.version "3.12" then rec { +let + provenance = if lib.versionOlder python.version "3.12" then rec { version = "1.5.1"; rev = version; hash = "sha256-M8vASxhaJPgkiTrAckxz7gk/QHkrFlNz7fFbnLEBT+M="; @@ -22,19 +22,19 @@ with ( version = "1.5.1-unstable-2023-11-03"; rev = "b763a757bb2bef2ab63620611ddd8006d5e9e4a2"; hash = "sha256-11WajEDtisiJsKQjZMSd5sDog3DuuBzf1PcgSY+uuXY="; - } -); + }; +in buildPythonPackage rec { pname = "asn1crypto"; pyproject = true; - inherit version; + inherit (provenance) version; # Pulling from Github to run tests src = fetchFromGitHub { owner = "wbond"; repo = "asn1crypto"; - inherit rev hash; + inherit (provenance) rev hash; }; nativeBuildInputs = [