about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2024-04-25 10:19:42 -0400
committerGitHub <noreply@github.com>2024-04-25 10:19:42 -0400
commit2d3016f15d4899acc4684a043c398dc869438f80 (patch)
tree88e6172b3fdaaeb8e7f4f0a8760b703fbab420de /pkgs/by-name
parenta9e3d60ed58cd81c67f8412f441081f337021d18 (diff)
parent010d0f2251225a2b0c1d624803c0b19a4a8befe0 (diff)
Merge pull request #306742 from NixOS/backport-306562-to-release-23.11
[Backport release-23.11] htb-toolkit: unstable-2024-01-17 -> 0-unstable-2024-04-22
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/ht/htb-toolkit/package.nix25
1 files 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 b833fed50580d..cedbe645f9416 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; {