From 1be8e6c8ae2835320c9ccff74e6f404a710dc382 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 18 Sep 2024 22:32:01 -0400 Subject: [PATCH] htgettoken: init at 2.0 (#342364) --- pkgs/by-name/ht/htgettoken/package.nix | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/by-name/ht/htgettoken/package.nix diff --git a/pkgs/by-name/ht/htgettoken/package.nix b/pkgs/by-name/ht/htgettoken/package.nix new file mode 100644 index 000000000000..30d34adeb231 --- /dev/null +++ b/pkgs/by-name/ht/htgettoken/package.nix @@ -0,0 +1,41 @@ +{ + lib, + fetchFromGitHub, + python3, + makeWrapper, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "htgettoken"; + version = "2.0"; + + src = fetchFromGitHub { + owner = "fermitools"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-yHUD8UaRNclALKKToFNzC49w5jivabXBt28xi6/u0Ow="; + }; + + nativeBuildInputs = with python3.pkgs; [ + setuptools + makeWrapper + ]; + + postInstall = with python3.pkgs; '' + wrapProgram $out/bin/htgettoken \ + --set PYTHONPATH "${ + makePythonPath [ + gssapi + paramiko + urllib3 + ] + }" + ''; + + meta = with lib; { + description = "Gets OIDC authentication tokens for High Throughput Computing via a Hashicorp vault server "; + license = licenses.bsd3; + homepage = "https://github.com/fermitools/htgettoken"; + maintainers = with maintainers; [ veprbl ]; + }; +}