2021-01-20 22:16:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-05-29 11:33:07 +00:00
|
|
|
, fetchFromGitHub
|
2020-03-04 21:50:51 +00:00
|
|
|
, pkg-config
|
2019-05-29 11:33:07 +00:00
|
|
|
, glib
|
|
|
|
, glibc
|
|
|
|
, systemd
|
2020-05-19 00:40:59 +00:00
|
|
|
, nixosTests
|
2019-05-29 11:33:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-03-04 21:50:51 +00:00
|
|
|
pname = "conmon";
|
2021-02-04 04:40:30 +00:00
|
|
|
version = "2.0.26";
|
2019-05-29 11:33:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
2020-03-04 21:50:51 +00:00
|
|
|
repo = pname;
|
2019-05-29 11:33:07 +00:00
|
|
|
rev = "v${version}";
|
2021-02-04 04:40:30 +00:00
|
|
|
sha256 = "sha256-q2lh02iZ7FDBPjtoKY5p3c6Vcn9Ey8DCMn/Oe7/74ug=";
|
2019-05-29 11:33:07 +00:00
|
|
|
};
|
|
|
|
|
2020-03-04 21:50:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-19 00:14:41 +00:00
|
|
|
buildInputs = [ glib systemd ]
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
|
2019-05-29 11:33:07 +00:00
|
|
|
|
2020-12-17 19:28:47 +00:00
|
|
|
# manpage requires building the vendored go-md2man
|
|
|
|
makeFlags = [ "bin/conmon" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D bin/conmon -t $out/bin
|
|
|
|
'';
|
2019-05-29 11:33:07 +00:00
|
|
|
|
2020-08-23 22:42:49 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) cri-o podman; };
|
2020-05-19 00:40:59 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-04 21:50:51 +00:00
|
|
|
homepage = "https://github.com/containers/conmon";
|
2019-05-29 11:33:07 +00:00
|
|
|
description = "An OCI container runtime monitor";
|
|
|
|
license = licenses.asl20;
|
2020-04-03 10:11:24 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
2019-05-29 11:33:07 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|