nixos-config/pkgs/binary-ninja-personal/default.nix

102 lines
1.7 KiB
Nix
Raw Normal View History

2020-09-24 05:45:48 +00:00
{ stdenv
2020-12-09 05:55:01 +00:00
, alsaLib
2020-09-24 05:45:48 +00:00
, autoPatchelfHook
2020-12-09 05:55:01 +00:00
, dbus
2020-09-24 05:45:48 +00:00
, fontconfig
, freetype
2020-12-09 05:55:01 +00:00
, glib
, krb5
2020-09-24 05:45:48 +00:00
, libglvnd
, libICE
2020-12-09 05:55:01 +00:00
, libSM
, libX11
2020-09-24 05:45:48 +00:00
, libXcomposite
, libXcursor
, libXdamage
2020-12-09 05:55:01 +00:00
, libXext
, libXi
, libxkbcommon
2020-09-24 05:45:48 +00:00
, libXrandr
2020-12-09 05:55:01 +00:00
, libXrender
, libXtst
, makeWrapper
, nss
2022-02-10 21:58:41 +00:00
, python3
2020-12-09 05:55:01 +00:00
, requireFile
, systemd
, unzip
2020-09-24 05:45:48 +00:00
, xcbutilimage
, xcbutilkeysyms
, xcbutilrenderutil
2020-12-09 05:55:01 +00:00
, xcbutilwm
, xkeyboardconfig
, zlib
2020-09-18 13:54:09 +00:00
}:
2022-02-10 21:58:41 +00:00
let
# curl -O https://binary.ninja/js/hashes.js
hjs = builtins.fromJSON (builtins.readFile ./hashes.js);
in
2020-09-18 13:54:09 +00:00
stdenv.mkDerivation rec {
2021-06-10 19:51:04 +00:00
pname = "binaryninja";
2022-02-10 21:58:41 +00:00
inherit (hjs) version;
# TODO: missing libQt6PrintSupport.so.6
autoPatchelfIgnoreMissingDeps = true;
2020-09-18 13:54:09 +00:00
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
2020-12-09 05:55:01 +00:00
buildInputs = [
alsaLib
2020-09-24 05:45:48 +00:00
autoPatchelfHook
2020-12-09 05:55:01 +00:00
dbus
2020-09-24 05:45:48 +00:00
fontconfig
freetype
2020-12-09 05:55:01 +00:00
glib
krb5
2020-09-24 05:45:48 +00:00
libglvnd
libICE
2020-12-09 05:55:01 +00:00
libSM
libX11
2020-09-24 05:45:48 +00:00
libXcomposite
libXcursor
libXdamage
2020-12-09 05:55:01 +00:00
libXext
libXi
libxkbcommon
2020-09-24 05:45:48 +00:00
libXrandr
2020-12-09 05:55:01 +00:00
libXrender
libXtst
makeWrapper
nss
2022-02-10 21:58:41 +00:00
python3
2020-12-09 05:55:01 +00:00
stdenv.cc.cc.lib
unzip
2020-09-24 05:45:48 +00:00
xcbutilimage
xcbutilkeysyms
xcbutilrenderutil
2020-12-09 05:55:01 +00:00
xcbutilwm
zlib
2020-09-24 05:45:48 +00:00
];
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
dontStrip = true;
dontPatchELF = true;
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
installPhase = ''
mkdir -p $out/lib $out/bin $out/share
mv $NIX_BUILD_TOP/$sourceRoot $out/lib/binary-ninja
makeWrapper $out/lib/binary-ninja/binaryninja $out/bin/binaryninja \
2020-12-09 05:55:01 +00:00
--suffix LD_LIBRARY_PATH : "${systemd}/lib" \
2022-02-10 21:58:41 +00:00
--suffix LD_LIBRARY_PATH : "${python3}/lib" \
2020-09-24 05:45:48 +00:00
--set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \
--set QTCOMPOSE "${libX11.out}/share/X11/locale"
'';
2021-11-02 02:21:01 +00:00
meta.platforms = [ "x86_64-linux" ];
2020-09-18 13:54:09 +00:00
}