2021-01-20 23:16:03 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-05-29 13:33:07 +02:00
|
|
|
, 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";
|
2021-03-08 20:26:14 +01:00
|
|
|
version = "2.0.27";
|
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}";
|
2021-03-08 20:26:14 +01:00
|
|
|
sha256 = "sha256-LMvhSoKd652XVPzuId8Ortf0f08FUP1zCn06PgtRwkA=";
|
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 ]
|
2021-01-15 06:42:41 +01:00
|
|
|
++ 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 = ''
|
2021-03-31 08:52:06 +02:00
|
|
|
runHook preInstall
|
2020-12-17 20:28:47 +01:00
|
|
|
install -D bin/conmon -t $out/bin
|
2021-03-31 08:52:06 +02:00
|
|
|
runHook postInstall
|
2020-12-17 20:28:47 +01:00
|
|
|
'';
|
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
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with 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;
|
|
|
|
};
|
|
|
|
}
|