fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 openssl,
7 stdenv,
8 coreutils,
9 gnome-keyring,
10 libsecret,
11 openvpn,
12 gzip,
13 killall,
14}:
15
16rustPlatform.buildRustPackage {
17 pname = "htb-toolkit";
18 version = "0-unstable-2025-03-15";
19
20 src = fetchFromGitHub {
21 owner = "D3vil0p3r";
22 repo = "htb-toolkit";
23 # https://github.com/D3vil0p3r/htb-toolkit/issues/3
24 rev = "dd193c2974cd5fd1bbc6f7f616ebd597e28539ec";
25 hash = "sha256-NTZv0BPyIB32CNXbINYTy4n8tNVJ3pRLr1QDhI/tg2Y=";
26 };
27
28 cargoHash = "sha256-ReEe8pyW66GXIPwAy6IKsFEAUjxHmzw5mj21i/h4quQ=";
29
30 # Patch to disable prompt change of the shell when a target machine is run. Needed due to Nix declarative nature
31 patches = [
32 ./disable-shell-prompt-change.patch
33 ];
34
35 nativeBuildInputs = [
36 pkg-config
37 ];
38
39 buildInputs = [
40 openssl
41 ]
42 ++ lib.optionals stdenv.hostPlatform.isLinux [
43 gnome-keyring
44 ];
45
46 postPatch = ''
47 substituteInPlace src/manage.rs \
48 --replace-fail /usr/share/icons/htb-toolkit/ $out/share/icons/htb-toolkit/
49 substituteInPlace src/utils.rs \
50 --replace-fail "\"base64\"" "\"${coreutils}/bin/base64\"" \
51 --replace-fail "\"gunzip\"" "\"${gzip}/bin/gunzip\""
52 substituteInPlace src/appkey.rs \
53 --replace-fail secret-tool ${lib.getExe libsecret}
54 substituteInPlace src/vpn.rs \
55 --replace-fail "arg(\"openvpn\")" "arg(\"${openvpn}/bin/openvpn\")" \
56 --replace-fail "arg(\"killall\")" "arg(\"${killall}/bin/killall\")"
57 '';
58
59 meta = with lib; {
60 description = "Play Hack The Box directly on your system";
61 mainProgram = "htb-toolkit";
62 homepage = "https://github.com/D3vil0p3r/htb-toolkit";
63 maintainers = with maintainers; [ d3vil0p3r ];
64 platforms = platforms.unix;
65 license = licenses.gpl3Plus;
66 };
67}