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