nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchFromGitHub,
6 makeWrapper,
7 libxrandr,
8 libxi,
9 libxcursor,
10 libx11,
11 vulkan-loader,
12}:
13
14rustPlatform.buildRustPackage rec {
15 pname = "binocle";
16 version = "0.3.2";
17
18 src = fetchFromGitHub {
19 owner = "sharkdp";
20 repo = "binocle";
21 rev = "v${version}";
22 sha256 = "sha256-WAk7xIrCRfVofn4w+gP5E3wnSZbXm/6MZWlNmtoLm20=";
23 };
24
25 cargoHash = "sha256-AUmDubbi6y1SaHZazr2xZc+16SQhI6WBnPg6I7rv3K4=";
26
27 nativeBuildInputs = [
28 makeWrapper
29 ];
30
31 postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
32 wrapProgram $out/bin/binocle \
33 --suffix LD_LIBRARY_PATH : ${
34 lib.makeLibraryPath [
35 libx11
36 libxcursor
37 libxi
38 libxrandr
39 vulkan-loader
40 ]
41 }
42 '';
43
44 meta = {
45 description = "Graphical tool to visualize binary data";
46 mainProgram = "binocle";
47 homepage = "https://github.com/sharkdp/binocle";
48 license = with lib.licenses; [
49 asl20 # or
50 mit
51 ];
52 maintainers = [ ];
53 };
54}