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

99 lines
1.9 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
, python38
, 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
}:
stdenv.mkDerivation rec {
2021-06-10 19:51:04 +00:00
pname = "binaryninja";
2021-06-28 20:00:12 +00:00
version = "2.4.2846";
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";
2021-06-28 20:00:12 +00:00
sha256 = (builtins.fromJSON (builtins.readFile ./hashes.js)).${name};
# https://binary.ninja/js/hashes.js
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
python38
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" \
--suffix LD_LIBRARY_PATH : "${python38}/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"
2020-12-09 05:55:01 +00:00
# Keeping the zip file in the nix store is desirable,
# because when the zip is missing requireFile involves manual steps.
# Below is just a hack to keep the zip from being garbage-collected.
ln -s "${src}" "$out/share/BinaryNinja-personal.zip"
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
}