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