about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/0x/default.nix
blob: 2f1493d23452eb89f6d9a4551e1cfb23841d9a55 (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
{ 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 ];
  };
}