2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, pkg-config
|
|
|
|
, btrfs-progs
|
|
|
|
, gpgme
|
|
|
|
, lvm2
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "dive";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.12.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wagoodman";
|
2023-07-15 17:15:38 +00:00
|
|
|
repo = "dive";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-CuVRFybsn7PVPgz3fz5ghpjOEOsTYTv6uUAgRgFewFw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
vendorHash = "sha256-uzzawa/Doo6j/Fh9dJMzGKbpp24UTLAo9VGmuQ80IZE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs gpgme lvm2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
patches = [
|
2024-06-05 15:53:02 +00:00
|
|
|
# fix scrolling
|
|
|
|
# See https://github.com/wagoodman/dive/pull/447
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-scrolling.patch";
|
|
|
|
url = "https://github.com/wagoodman/dive/pull/473/commits/a885fa6e68b3763d52de20603ee1b9cd8949276f.patch";
|
|
|
|
hash = "sha256-6gTWfyvK19xDqc7Ah33ewgz/WQRcQHLYwerrwUtRpJc=";
|
|
|
|
})
|
2024-05-15 15:35:15 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "add-scrolling-layers.patch";
|
2024-06-05 15:53:02 +00:00
|
|
|
url = "https://github.com/wagoodman/dive/pull/473/commits/840653158e235bdd59b4c4621cf282ce6499c714.patch";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-dYqg5JpWKOzy3hVjIVCHA2vmKCtCgc8W+oHEzuGpyxc=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-render-update.patch";
|
2024-06-05 15:53:02 +00:00
|
|
|
url = "https://github.com/wagoodman/dive/pull/473/commits/36177a9154eebe9e3ae9461a9e6f6b368f7974e1.patch";
|
|
|
|
hash = "sha256-rSeEYxUaYlEZGv+NWYK+nATBYS4P2swqjC3HimHyqNI=";
|
2024-05-15 15:35:15 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool for exploring each layer in a docker image";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dive";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/wagoodman/dive";
|
2024-02-07 01:22:34 +00:00
|
|
|
changelog = "https://github.com/wagoodman/dive/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|