From 6734bc99f7c5e0e01de7ecebdfd3dadede69cdd7 Mon Sep 17 00:00:00 2001 From: Krzysztof Nazarewski Date: Thu, 23 Nov 2023 10:46:42 +0100 Subject: [PATCH] python3Packages.keyring-pass: init at 0.9.2 closes #241660 --- .../python-modules/keyring-pass/default.nix | 78 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 80 insertions(+) create mode 100644 pkgs/development/python-modules/keyring-pass/default.nix diff --git a/pkgs/development/python-modules/keyring-pass/default.nix b/pkgs/development/python-modules/keyring-pass/default.nix new file mode 100644 index 000000000000..c9ac11c9313a --- /dev/null +++ b/pkgs/development/python-modules/keyring-pass/default.nix @@ -0,0 +1,78 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, gnupg +, keyring +, pass +, poetry-core +, pythonOlder +}: +buildPythonPackage rec { + pname = "keyring-pass"; + version = "0.9.2"; + disabled = pythonOlder "3.6"; + + pyproject = true; + + src = fetchFromGitHub { + owner = "nazarewk"; + repo = "keyring_pass"; + rev = "refs/tags/v${version}"; + hash = "sha256-Sf7eDOB3prH2s6BzdBtxewSweC0ibLXVxNHBJRRaJe4="; + }; + + postPatch = '' + substituteInPlace keyring_pass/__init__.py \ + --replace 'pass_binary = "pass"' 'pass_binary = "${lib.getExe pass}"' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + nativeCheckInputs = [ + keyring + gnupg + ]; + + checkPhase = '' + export HOME="$TMPDIR" + + # generate temporary GPG identity + cat <