diff --git a/pkgs/binary-ninja-personal/default.nix b/pkgs/binary-ninja-personal/default.nix index 5a2b0b5..3795233 100644 --- a/pkgs/binary-ninja-personal/default.nix +++ b/pkgs/binary-ninja-personal/default.nix @@ -21,7 +21,7 @@ , libXtst , makeWrapper , nss -, python38 +, python3 , requireFile , systemd , unzip @@ -32,15 +32,23 @@ , xkeyboardconfig , zlib }: + +let + # curl -O https://binary.ninja/js/hashes.js + hjs = builtins.fromJSON (builtins.readFile ./hashes.js); + +in stdenv.mkDerivation rec { pname = "binaryninja"; - version = "2.4.2846"; + inherit (hjs) version; + + # TODO: missing libQt6PrintSupport.so.6 + autoPatchelfIgnoreMissingDeps = true; src = requireFile rec { name = "BinaryNinja-personal.zip"; url = "https://binary.ninja"; - sha256 = (builtins.fromJSON (builtins.readFile ./hashes.js)).${name}; - # https://binary.ninja/js/hashes.js + sha256 = hjs.hashes.${name}; }; buildInputs = [ @@ -66,7 +74,7 @@ stdenv.mkDerivation rec { libXtst makeWrapper nss - python38 + python3 stdenv.cc.cc.lib unzip xcbutilimage @@ -84,14 +92,9 @@ stdenv.mkDerivation rec { mv $NIX_BUILD_TOP/$sourceRoot $out/lib/binary-ninja makeWrapper $out/lib/binary-ninja/binaryninja $out/bin/binaryninja \ --suffix LD_LIBRARY_PATH : "${systemd}/lib" \ - --suffix LD_LIBRARY_PATH : "${python38}/lib" \ + --suffix LD_LIBRARY_PATH : "${python3}/lib" \ --set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \ --set QTCOMPOSE "${libX11.out}/share/X11/locale" - - # 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" ''; meta.platforms = [ "x86_64-linux" ]; diff --git a/pkgs/binary-ninja-personal/hashes.js b/pkgs/binary-ninja-personal/hashes.js index 267bec9..73e7eae 100644 --- a/pkgs/binary-ninja-personal/hashes.js +++ b/pkgs/binary-ninja-personal/hashes.js @@ -1 +1 @@ -{"BinaryNinja-headless.zip": "33ae7ad26c50707cdf063dfaa0bb5206ad8403b79ed0f5193422f484b15be4e7", "BinaryNinja-personal.zip": "b519e371af2e5162fdb12f3426a2e007cab357e6e93aed8132144aea33af246c", "BinaryNinja-personal.dmg": "fe0bf0e4d094d9c411b7fc4384f89f596e1cdda901c3b07cbdff6d27e80bc30e", "BinaryNinja-personal.exe": "4a32a57fe0d400e2d9c2e15ec692476108057107143d3fc545789b62aa7cae5d", "BinaryNinja.zip": "acc72ad6239b8f45201702996df62550675dce9b56f4ec39bab27c9b9127c91f", "BinaryNinja.dmg": "6293418d4e92ee8e55f013ad54f6842b5ffc915f77a5b13bae76663a74bc60fc", "BinaryNinja.exe": "37718e3e29457f5b4b24c6ff7f4b16d696ea418e3e9f1f1073d9963ee711a5fb"} \ No newline at end of file +{"version": "3.0.3233", "hashes": {"BinaryNinja-headless.zip": "137c01cf0fb13d0f69ef7a824688777badd33d0489564320bd742403c802c902", "BinaryNinja-personal.zip": "73f5c3624a43e6938ea6ade935009e44cd40b10d2d911d9b1a1f7f4bf19ca50b", "BinaryNinja-personal.dmg": "f9ffc2cd12814b4dc0a7424e27f123d0034e2e25f9bc38047ecc765181171cfb", "BinaryNinja-personal.exe": "a2e63ee23831e77dc9b77c6b610adfb3a8ed7eae85dbf6012b366c1862466a61", "BinaryNinja.zip": "a372b19c30b5b0ed617fb2594b2506738dbe8ec6d119f34409a0c0c9dd62d47a", "BinaryNinja.dmg": "7601c6d67676ebfbef9981a1950dbc09dc39366f26872bd504f18a924673604c", "BinaryNinja.exe": "8cf483eb09fcf4fd7236eeb9c80248b541cf90dc029170bef78f8b5e3e19614a"}} \ No newline at end of file