2021-01-20 22:16:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-05-29 12:33:07 +01:00
|
|
|
, fetchFromGitHub
|
2020-03-04 21:50:51 +00:00
|
|
|
, pkg-config
|
2019-05-29 12:33:07 +01:00
|
|
|
, glib
|
|
|
|
, glibc
|
2021-09-22 22:07:05 +01:00
|
|
|
, libseccomp
|
2019-05-29 12:33:07 +01:00
|
|
|
, systemd
|
2020-05-19 01:40:59 +01:00
|
|
|
, nixosTests
|
2019-05-29 12:33:07 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-03-04 21:50:51 +00:00
|
|
|
pname = "conmon";
|
2021-09-22 22:07:05 +01:00
|
|
|
version = "2.0.30";
|
2019-05-29 12:33:07 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
2020-03-04 21:50:51 +00:00
|
|
|
repo = pname;
|
2019-05-29 12:33:07 +01:00
|
|
|
rev = "v${version}";
|
2021-09-22 22:07:05 +01:00
|
|
|
sha256 = "sha256-NZMuHhQyo+95QTJcR79cyZr86ytkbo4nmaqTF0Bdt+s=";
|
2019-05-29 12:33:07 +01:00
|
|
|
};
|
|
|
|
|
2020-03-04 21:50:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-09-22 22:07:05 +01:00
|
|
|
buildInputs = [ glib libseccomp systemd ]
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
|
2019-05-29 12:33:07 +01:00
|
|
|
|
2020-12-17 19:28:47 +00:00
|
|
|
# manpage requires building the vendored go-md2man
|
|
|
|
makeFlags = [ "bin/conmon" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-03-31 07:52:06 +01:00
|
|
|
runHook preInstall
|
2020-12-17 19:28:47 +00:00
|
|
|
install -D bin/conmon -t $out/bin
|
2021-03-31 07:52:06 +01:00
|
|
|
runHook postInstall
|
2020-12-17 19:28:47 +00:00
|
|
|
'';
|
2019-05-29 12:33:07 +01:00
|
|
|
|
2020-08-23 23:42:49 +01:00
|
|
|
passthru.tests = { inherit (nixosTests) cri-o podman; };
|
2020-05-19 01:40:59 +01: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 12:33:07 +01:00
|
|
|
description = "An OCI container runtime monitor";
|
|
|
|
license = licenses.asl20;
|
2020-04-03 11:11:24 +01:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
2019-05-29 12:33:07 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|