summary refs log tree commit diff
path: root/pkgs/applications/misc/binocle/default.nix
blob: ccb748fe3a627dd0d10724fe62e2655fd4d2c722 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, makeWrapper
, xorg
, vulkan-loader
}:

rustPlatform.buildRustPackage rec {
  pname = "binocle";
  version = "0.3.0";

  src = fetchFromGitHub {
    owner = "sharkdp";
    repo = pname;
    rev = "v${version}";
    sha256 = "0b0hf2aq34kxxj0la0yar5sp44k6mqcbyailp6j6q0mksf1l74bc";
  };

  cargoSha256 = "sha256-CZWAHWZYaL54Rl6Jrp8B6w6HK+2fIKQle2x4mGHv2/o=";

  nativeBuildInputs = [
    makeWrapper
  ];

  postInstall = ''
    wrapProgram $out/bin/binocle \
      --suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with xorg; [ libX11 libXcursor libXi libXrandr ] ++ [ vulkan-loader ])}
  '';

  meta = with lib; {
    description = "Graphical tool to visualize binary data";
    homepage = "https://github.com/sharkdp/binocle";
    license = with licenses; [ asl20 /* or */ mit ];
    maintainers = with maintainers; [ SuperSandro2000 ];
    broken = stdenv.isDarwin;
  };
}