nixpkgs/pkgs/applications/misc/binocle/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-27 17:35:19 +02:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, makeWrapper
2022-07-10 20:26:52 +02:00
, AppKit
, CoreFoundation
, CoreGraphics
, CoreVideo
, Foundation
, Metal
, QuartzCore
2022-05-27 17:35:19 +02:00
, xorg
, vulkan-loader
}:
rustPlatform.buildRustPackage rec {
pname = "binocle";
2023-12-02 10:07:43 +01:00
version = "0.3.2";
2022-05-27 17:35:19 +02:00
src = fetchFromGitHub {
owner = "sharkdp";
repo = pname;
rev = "v${version}";
2023-12-02 10:07:43 +01:00
sha256 = "sha256-WAk7xIrCRfVofn4w+gP5E3wnSZbXm/6MZWlNmtoLm20=";
2022-05-27 17:35:19 +02:00
};
2023-12-02 10:07:43 +01:00
cargoHash = "sha256-ZmY88WcoQiDLSXkBbnE/+jPX713qh6n+nyNXeWWTBKA=";
2022-05-27 17:35:19 +02:00
nativeBuildInputs = [
makeWrapper
];
2022-07-10 20:26:52 +02:00
buildInputs = lib.optionals stdenv.isDarwin [
AppKit CoreFoundation CoreGraphics CoreVideo Foundation Metal QuartzCore
];
postInstall = lib.optionalString (!stdenv.isDarwin) ''
2022-05-27 17:35:19 +02:00
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; [ figsoda ];
2022-05-27 17:35:19 +02:00
};
}