From caf54e3774aa244aa8355cd7ae1b4b53b3679d94 Mon Sep 17 00:00:00 2001 From: D3vil0p3r Date: Wed, 24 Apr 2024 17:11:58 +0200 Subject: [PATCH] htb-toolkit: unstable-2024-01-17 -> 0-unstable-2024-04-22 --- pkgs/by-name/ht/htb-toolkit/package.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ht/htb-toolkit/package.nix b/pkgs/by-name/ht/htb-toolkit/package.nix index b833fed50580..cedbe645f941 100644 --- a/pkgs/by-name/ht/htb-toolkit/package.nix +++ b/pkgs/by-name/ht/htb-toolkit/package.nix @@ -17,17 +17,17 @@ rustPlatform.buildRustPackage { pname = "htb-toolkit"; - version = "unstable-2024-01-17"; + version = "0-unstable-2024-04-22"; src = fetchFromGitHub { owner = "D3vil0p3r"; repo = "htb-toolkit"; # https://github.com/D3vil0p3r/htb-toolkit/issues/3 - rev = "54e11774ea8746ea540548082d3b25c22306b4fc"; - hash = "sha256-QYUqdqFV9Qn+VbJTnz5hx5I0XV1nrzCoCKtRS7jBLsE="; + rev = "921e4b352a9dd8b3bc8ac8774e13509abd179aef"; + hash = "sha256-o91p/m06pm9qoYZZVh+qHulqHO2G7xVJQPpEvRsq+8Q="; }; - cargoHash = "sha256-XDE6A6EIAUbuzt8Zb/ROfDAPp0ZyN0WQ4D1gWHjRVhg="; + cargoHash = "sha256-vTUiagI0eTrADr6zCMI5btLRvXgZSaohldg4jYmjfyA="; # Patch to disable prompt change of the shell when a target machine is run. Needed due to Nix declarative nature patches = [ @@ -39,24 +39,25 @@ rustPlatform.buildRustPackage { ]; buildInputs = [ - gnome.gnome-keyring openssl + ] ++ lib.optionals stdenv.isLinux [ + gnome.gnome-keyring ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.SystemConfiguration ]; postPatch = '' substituteInPlace src/manage.rs \ - --replace /usr/share/htb-toolkit/icons/ $out/share/htb-toolkit/icons/ + --replace-fail /usr/share/icons/htb-toolkit/ $out/share/icons/htb-toolkit/ substituteInPlace src/utils.rs \ - --replace /usr/bin/bash ${bash} \ - --replace "\"base64\"" "\"${coreutils}/bin/base64\"" \ - --replace "\"gunzip\"" "\"${gzip}/bin/gunzip\"" + --replace-fail "\"base64\"" "\"${coreutils}/bin/base64\"" \ + --replace-fail "\"gunzip\"" "\"${gzip}/bin/gunzip\"" substituteInPlace src/appkey.rs \ - --replace secret-tool ${lib.getExe libsecret} + --replace-fail secret-tool ${lib.getExe libsecret} substituteInPlace src/vpn.rs \ - --replace "arg(\"openvpn\")" "arg(\"${openvpn}/bin/openvpn\")" \ - --replace "arg(\"killall\")" "arg(\"${killall}/bin/killall\")" + --replace-fail "arg(\"openvpn\")" "arg(\"${openvpn}/bin/openvpn\")" \ + --replace-fail "arg(\"killall\")" "arg(\"${killall}/bin/killall\")" ''; meta = with lib; {