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

96 lines
1.8 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 {
2020-12-09 05:55:01 +00:00
pname = "binary-ninja-personal";
version = "2.3.2660";
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
src = requireFile {
name = "BinaryNinja-personal.zip";
url = "https://binary.ninja";
sha256 = "f3e2519c1254a6e7b7d112790b41c687b9060bba3033b7c89871185b87be7dce";
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
'';
2020-09-18 13:54:09 +00:00
}