nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 autoPatchelfHook,
3 copyDesktopItems,
4 dbus,
5 fetchurl,
6 fontconfig,
7 freetype,
8 lib,
9 libGLU,
10 libxkbcommon,
11 makeDesktopItem,
12 stdenv,
13 unzip,
14 wayland,
15 xcbutilimage,
16 xcbutilkeysyms,
17 xcbutilrenderutil,
18 xcbutilwm,
19 libxml2,
20}:
21stdenv.mkDerivation (finalAttrs: {
22 pname = "binaryninja-free";
23 version = "5.2.8722";
24
25 src = fetchurl {
26 url = "https://github.com/Vector35/binaryninja-api/releases/download/stable/${finalAttrs.version}/binaryninja_free_linux.zip";
27 hash = "sha256-YlBr/Cdjev7LWY/VsKgv/i3zHj4YR49RX69zmhhie7U=";
28 };
29
30 icon = fetchurl {
31 url = "https://raw.githubusercontent.com/Vector35/binaryninja-api/448f40be71dffa86a6581c3696627ccc1bdf74f2/docs/img/logo.png";
32 hash = "sha256-TzGAAefTknnOBj70IHe64D6VwRKqIDpL4+o9kTw0Mn4=";
33 };
34
35 desktopItems = [
36 (makeDesktopItem {
37 name = "com.vector35.binaryninja";
38 desktopName = "Binary Ninja Free";
39 comment = "A Reverse Engineering Platform";
40 exec = "binaryninja";
41 icon = "binaryninja";
42 mimeTypes = [
43 "application/x-binaryninja"
44 "x-scheme-handler/binaryninja"
45 ];
46 categories = [ "Utility" ];
47 })
48 ];
49
50 nativeBuildInputs = [
51 unzip
52 autoPatchelfHook
53 copyDesktopItems
54 ];
55
56 buildInputs = [
57 dbus
58 fontconfig
59 freetype
60 libGLU
61 libxkbcommon
62 stdenv.cc.cc.lib
63 wayland
64 xcbutilimage
65 xcbutilkeysyms
66 xcbutilrenderutil
67 xcbutilwm
68 ];
69
70 installPhase = ''
71 runHook preInstall
72 mkdir -p $out/
73 cp -R . $out/
74
75 mkdir $out/bin
76 ln -s $out/binaryninja $out/bin/binaryninja
77
78 install -Dm644 ${finalAttrs.icon} $out/share/icons/hicolor/256x256/apps/binaryninja.png
79
80 runHook postInstall
81 '';
82
83 meta = {
84 changelog = "https://binary.ninja/changelog/#${
85 lib.replaceStrings [ "." ] [ "-" ] finalAttrs.version
86 }";
87 description = "Interactive decompiler, disassembler, debugger";
88 homepage = "https://binary.ninja/";
89 license = {
90 fullName = "Binary Ninja Free Software License";
91 url = "https://docs.binary.ninja/about/license.html#free-license";
92 free = false;
93 };
94 mainProgram = "binaryninja";
95 maintainers = with lib.maintainers; [
96 scoder12
97 timschumi
98 ];
99 platforms = [ "x86_64-linux" ];
100 };
101})