2022-07-19 13:41:26 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, pkg-config
|
|
|
|
, btrfs-progs
|
|
|
|
, gpgme
|
|
|
|
, lvm2
|
|
|
|
}:
|
2018-12-21 13:15:17 +00:00
|
|
|
|
2019-05-25 02:00:00 +00:00
|
|
|
buildGoModule rec {
|
2018-12-21 13:15:17 +00:00
|
|
|
pname = "dive";
|
2021-03-08 20:51:41 +00:00
|
|
|
version = "0.10.0";
|
2018-12-21 13:15:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wagoodman";
|
2019-05-25 02:00:00 +00:00
|
|
|
repo = pname;
|
2018-12-21 13:15:17 +00:00
|
|
|
rev = "v${version}";
|
2021-03-08 20:51:41 +00:00
|
|
|
sha256 = "sha256-1pmw8pUlek5FlI1oAuvLSqDow7hw5rw86DRDZ7pFAmA=";
|
2018-12-21 13:15:17 +00:00
|
|
|
};
|
|
|
|
|
2022-07-19 13:41:26 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/wagoodman/dive/commit/fe9411c414418d839a8638bb9a12ccfc892b5845.patch";
|
|
|
|
sha256 = "sha256-c0TcUQ87CeOiXHoTQ3z/04i72aDr403DL7fIbXTJ9cY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorSha256 = "sha256-YPkEei7d7mXP+5FhooNoMDARQLosH2fdSaLXGZ5C27o=";
|
2018-12-21 13:15:17 +00:00
|
|
|
|
2019-11-05 23:00:00 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs gpgme lvm2 ];
|
2019-11-05 23:00:00 +00:00
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-02-09 21:20:00 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2018-12-21 13:15:17 +00:00
|
|
|
description = "A tool for exploring each layer in a docker image";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/wagoodman/dive";
|
2018-12-21 13:15:17 +00:00
|
|
|
license = licenses.mit;
|
2021-03-08 20:51:41 +00:00
|
|
|
maintainers = with maintainers; [ marsam spacekookie SuperSandro2000 ];
|
2018-12-21 13:15:17 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|