nixos-config/pkgs/binaryninja/default.nix

45 lines
776 B
Nix
Raw Normal View History

2020-09-24 05:45:48 +00:00
{ stdenv
, autoPatchelfHook
2023-03-11 03:45:04 +00:00
, libglvnd
2020-12-09 05:55:01 +00:00
, makeWrapper
2022-02-10 21:58:41 +00:00
, python3
2023-03-11 03:45:04 +00:00
, qt6
2020-12-09 05:55:01 +00:00
, 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 {
2020-09-24 05:45:48 +00:00
name = "BinaryNinja-personal.zip";
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
makeWrapper $out/lib/binaryninja-personal/binaryninja $out/bin/binaryninja \
--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
}