diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-06-16 22:48:01 +0200 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-06-16 22:48:01 +0200 |
| commit | cd559b3de75bd491b8393f33eb9afed67c1a36cf (patch) | |
| tree | 84c8c2ab927a2404f1c569c255f9c11a956f914b /modules | |
| parent | 14f0ea576d2073d24b4d3df3ec60ee81e807cf57 (diff) | |
feat(hcli): create hcli pkg
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/hosts/adam/flake-parts.nix | 2 | ||||
| -rw-r--r-- | modules/pkgs/hcli.nix | 69 |
2 files changed, 71 insertions, 0 deletions
diff --git a/modules/hosts/adam/flake-parts.nix b/modules/hosts/adam/flake-parts.nix index dc1239e..e1153b3 100644 --- a/modules/hosts/adam/flake-parts.nix +++ b/modules/hosts/adam/flake-parts.nix @@ -8,10 +8,12 @@ inputs.nixpkgs-wayland.overlays.default inputs.self.overlays.ida-pro inputs.self.overlays.ida-pro-mcp + inputs.self.overlays.hcli ]; } adam ida-pro + hcli home-manager plymouth localization diff --git a/modules/pkgs/hcli.nix b/modules/pkgs/hcli.nix new file mode 100644 index 0000000..ba8feb5 --- /dev/null +++ b/modules/pkgs/hcli.nix @@ -0,0 +1,69 @@ +{ ... }: +{ + flake.overlays.hcli = final: prev: { + hcli = final.stdenv.mkDerivation rec { + pname = "hcli"; + version = "0.18.1"; + + src = final.fetchurl { + url = "https://github.com/HexRaysSA/ida-hcli/releases/download/v${version}/hcli-linux-x86_64-${version}"; + hash = "sha256-l9Wql8exa0a6IOTpaJdJ749WI2+9v5+3IJe8kVAm7Tw="; + }; + + dontUnpack = true; + + nativeBuildInputs = [ + final.autoPatchelfHook + final.makeWrapper + ]; + + buildInputs = [ + final.stdenv.cc.cc.lib + final.zlib + final.openssl + final.libffi + final.xz + final.bzip2 + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 "$src" "$out/bin/hcli-unwrapped" + + makeWrapper "$out/bin/hcli-unwrapped" "$out/bin/hcli" \ + --set-default HCLI_DISABLE_UPDATES true \ + --set-default HCLI_CURRENT_IDA_INSTALL_DIR "${final.ida-pro}/opt" \ + --set-default HCLI_CURRENT_IDA_PLATFORM "linux-x86_64" \ + --set-default HCLI_CURRENT_IDA_VERSION "${final.ida-pro.version}" + + runHook postInstall + ''; + + meta = with final.lib; { + description = "Hex-Rays command-line interface"; + homepage = "https://github.com/HexRaysSA/ida-hcli"; + license = licenses.mit; + mainProgram = "hcli"; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + }; + }; + }; + + flake.modules.nixos.hcli = + { pkgs, ... }: + { + environment.systemPackages = [ + pkgs.hcli + ]; + }; + + flake.modules.homeManager.hcli = + { pkgs, ... }: + { + home.packages = [ + pkgs.hcli + ]; + }; +} |
