diff --git a/pkgs/by-name/ht/htgettoken/package.nix b/pkgs/by-name/ht/htgettoken/package.nix index 7f94f37d9dc1..2827257ff15a 100644 --- a/pkgs/by-name/ht/htgettoken/package.nix +++ b/pkgs/by-name/ht/htgettoken/package.nix @@ -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 = {