htgettoken: migrate to pyproject and fix secondary programs (#528722)

This commit is contained in:
Dmitry Kalinkin
2026-06-08 18:22:15 +00:00
committed by GitHub
+51 -13
View File
@@ -1,14 +1,20 @@
{
lib,
fetchFromGitHub,
makeBinaryWrapper,
python3,
makeWrapper,
bash,
curl,
coreutils,
gnused,
jq,
scitokens-cpp,
}:
python3.pkgs.buildPythonApplication (finalAttrs: {
pname = "htgettoken";
version = "2.6";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "fermitools";
@@ -17,20 +23,52 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
hash = "sha256-jHKKTnFZ+6LHaB61wi5+Ht6ZHrE4dDqADIMfGWI47oM=";
};
nativeBuildInputs = with python3.pkgs; [
build-system = with python3.pkgs; [
setuptools
makeWrapper
];
postInstall = with python3.pkgs; ''
wrapProgram $out/bin/htgettoken \
--prefix PYTHONPATH : "${
makePythonPath [
gssapi
paramiko
urllib3
]
}"
nativeBuildInputs = [
makeBinaryWrapper
];
buildInputs = [
bash
curl
coreutils
jq
scitokens-cpp
];
dependencies = with python3.pkgs; [
gssapi
paramiko
urllib3
];
postInstall = ''
wrapProgram $out/bin/htdecodetoken \
--prefix PATH : ${
lib.makeBinPath [
coreutils
jq
scitokens-cpp
]
}
wrapProgram $out/bin/htdestroytoken \
--prefix PATH : $out/bin:${
lib.makeBinPath [
coreutils
curl
]
}
wrapProgram $out/bin/httokensh \
--prefix PATH : $out/bin:${
lib.makeBinPath [
coreutils
gnused
jq
]
}
'';
meta = {