2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, glibc
|
2021-09-23 15:35:13 +00:00
|
|
|
, libseccomp
|
2020-04-24 23:36:52 +00:00
|
|
|
, systemd
|
2020-05-29 06:06:01 +00:00
|
|
|
, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "conmon";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.1.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-/5HYEcJzdGAiaMAh82vlDjzwEc7bf9gAYOAz7fkysR0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-09-23 15:35:13 +00:00
|
|
|
buildInputs = [ glib libseccomp 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 = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preInstall
|
2020-12-25 13:55:36 +00:00
|
|
|
install -D bin/conmon -t $out/bin
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postInstall
|
2020-12-25 13:55:36 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
strictDeps = true;
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|