bandwhich: 0.23.0 -> 0.23.1; move to by-name; nixfmt; useFetchCargoVendor (#356934)
[NixPkgs.git] / pkgs / by-name / di / dive / package.nix
bloba6b005d2d0347ebc6e4c1430ed002e892e2bcfd1
2   lib,
3   stdenv,
4   buildGoModule,
5   fetchFromGitHub,
6   fetchpatch,
7   pkg-config,
8   btrfs-progs,
9   gpgme,
10   lvm2,
13 buildGoModule rec {
14   pname = "dive";
15   version = "0.12.0";
17   src = fetchFromGitHub {
18     owner = "wagoodman";
19     repo = "dive";
20     rev = "v${version}";
21     hash = "sha256-CuVRFybsn7PVPgz3fz5ghpjOEOsTYTv6uUAgRgFewFw=";
22   };
24   vendorHash = "sha256-uzzawa/Doo6j/Fh9dJMzGKbpp24UTLAo9VGmuQ80IZE=";
26   nativeBuildInputs = [ pkg-config ];
28   buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
29     btrfs-progs
30     gpgme
31     lvm2
32   ];
34   patches = [
35     # fix scrolling
36     # See https://github.com/wagoodman/dive/pull/447
37     (fetchpatch {
38       name = "fix-scrolling.patch";
39       url = "https://github.com/wagoodman/dive/pull/473/commits/a885fa6e68b3763d52de20603ee1b9cd8949276f.patch";
40       hash = "sha256-6gTWfyvK19xDqc7Ah33ewgz/WQRcQHLYwerrwUtRpJc=";
41     })
42     (fetchpatch {
43       name = "add-scrolling-layers.patch";
44       url = "https://github.com/wagoodman/dive/pull/473/commits/840653158e235bdd59b4c4621cf282ce6499c714.patch";
45       hash = "sha256-dYqg5JpWKOzy3hVjIVCHA2vmKCtCgc8W+oHEzuGpyxc=";
46     })
47     (fetchpatch {
48       name = "fix-render-update.patch";
49       url = "https://github.com/wagoodman/dive/pull/473/commits/36177a9154eebe9e3ae9461a9e6f6b368f7974e1.patch";
50       hash = "sha256-rSeEYxUaYlEZGv+NWYK+nATBYS4P2swqjC3HimHyqNI=";
51     })
52   ];
54   ldflags = [
55     "-s"
56     "-w"
57     "-X main.version=${version}"
58   ];
60   meta = with lib; {
61     description = "Tool for exploring each layer in a docker image";
62     mainProgram = "dive";
63     homepage = "https://github.com/wagoodman/dive";
64     changelog = "https://github.com/wagoodman/dive/releases/tag/v${version}";
65     license = licenses.mit;
66     maintainers = with maintainers; [ SuperSandro2000 ];
67   };