nixos-config/pkgs/binaryninja/default.nix

48 lines
980 B
Nix
Raw Permalink Normal View History

2024-11-08 03:59:57 +00:00
{
stdenv,
autoPatchelfHook,
libglvnd,
makeWrapper,
python3,
qt6,
requireFile,
unzip,
2020-09-18 13:54:09 +00:00
}:
2022-02-10 21:58:41 +00:00
let
2023-08-11 17:38:09 +00:00
hjs = builtins.fromJSON (builtins.readFile ./hashes.json);
2022-02-10 21:58:41 +00:00
in
2022-07-24 15:07:14 +00:00
stdenv.mkDerivation {
2021-06-10 19:51:04 +00:00
pname = "binaryninja";
2022-02-10 21:58:41 +00:00
inherit (hjs) version;
2021-06-28 20:00:12 +00:00
src = requireFile rec {
2024-05-23 03:13:43 +00:00
name = "binaryninja_personal_linux.zip";
2020-09-24 05:45:48 +00:00
url = "https://binary.ninja";
2022-02-10 21:58:41 +00:00
sha256 = hjs.hashes.${name};
2020-09-24 05:45:48 +00:00
};
2020-09-18 13:54:09 +00:00
2022-07-24 15:07:14 +00:00
nativeBuildInputs = [
2020-09-24 05:45:48 +00:00
autoPatchelfHook
2020-12-09 05:55:01 +00:00
makeWrapper
unzip
2020-09-24 05:45:48 +00:00
];
2020-09-18 13:54:09 +00:00
2022-07-24 15:07:14 +00:00
buildInputs = [
2023-03-11 03:45:04 +00:00
libglvnd
2022-11-27 03:06:02 +00:00
qt6.full
2022-07-24 15:07:14 +00:00
];
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
installPhase = ''
2022-07-24 15:07:14 +00:00
mkdir -p $out/lib $out/bin
cp -a . $out/lib/binaryninja-personal
2024-07-22 06:58:21 +00:00
uppath="~/.binaryninja/update/`echo -n $out/lib/binaryninja-personal|sha256sum|cut -c-64`"
2022-07-24 15:07:14 +00:00
makeWrapper $out/lib/binaryninja-personal/binaryninja $out/bin/binaryninja \
2024-07-22 06:58:21 +00:00
--run "install -D ${builtins.toFile "noauto" "{\"auto\":false}"} $uppath/manifest" \
2022-07-24 15:07:14 +00:00
--suffix LD_LIBRARY_PATH : "${python3}/lib"
2020-09-24 05:45:48 +00:00
'';
2021-11-02 02:21:01 +00:00
meta.platforms = [ "x86_64-linux" ];
2020-09-18 13:54:09 +00:00
}