nixpkgs/pkgs/tools/misc/0x/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

32 lines
659 B
Nix

{ lib
, fetchFromGitHub
, rustPlatform
}:
rustPlatform.buildRustPackage {
pname = "0x";
version = "unstable-2022-07-11";
src = fetchFromGitHub {
owner = "mcy";
repo = "0x";
rev = "8070704b8efdd1f16bc7e01e393230f16cd8b0a6";
hash = "sha256-NzD/j8rBfk/cpoBnkFHFqpXz58mswLZr8TUS16vlrZQ=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
meta = with lib; {
homepage = "https://github.com/mcy/0x";
description = "A colorful, configurable xxd";
mainProgram = "0x";
license = licenses.asl20;
maintainers = with maintainers; [ AndersonTorres ];
};
}