2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, glibc
|
|
|
|
, systemd
|
2020-05-29 06:06:01 +00:00
|
|
|
, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "conmon";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "2.0.26";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-q2lh02iZ7FDBPjtoKY5p3c6Vcn9Ey8DCMn/Oe7/74ug=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ glib systemd ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
# manpage requires building the vendored go-md2man
|
|
|
|
makeFlags = [ "bin/conmon" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D bin/conmon -t $out/bin
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) cri-o podman; };
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/containers/conmon";
|
|
|
|
description = "An OCI container runtime monitor";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|