2021-01-20 22:16:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-05-29 11:33:07 +00:00
|
|
|
, fetchFromGitHub
|
2023-12-16 12:45:45 +00:00
|
|
|
, fetchpatch2
|
2020-03-04 21:50:51 +00:00
|
|
|
, pkg-config
|
2019-05-29 11:33:07 +00:00
|
|
|
, glib
|
|
|
|
, glibc
|
2021-09-22 21:07:05 +00:00
|
|
|
, libseccomp
|
2019-05-29 11:33:07 +00:00
|
|
|
, systemd
|
2020-05-19 00:40:59 +00:00
|
|
|
, nixosTests
|
2019-05-29 11:33:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-03-04 21:50:51 +00:00
|
|
|
pname = "conmon";
|
2024-05-17 03:49:03 +00:00
|
|
|
version = "2.1.12";
|
2019-05-29 11:33:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
2020-03-04 21:50:51 +00:00
|
|
|
repo = pname;
|
2019-05-29 11:33:07 +00:00
|
|
|
rev = "v${version}";
|
2024-05-17 03:49:03 +00:00
|
|
|
hash = "sha256-iSC1Q7fdf+4YH4vLFPOscRWxNv/xygYx872u8msmMmc=";
|
2019-05-29 11:33:07 +00:00
|
|
|
};
|
|
|
|
|
2020-03-04 21:50:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-09-22 21:07:05 +00:00
|
|
|
buildInputs = [ glib libseccomp systemd ]
|
2023-08-24 14:29:11 +00:00
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
|
2019-05-29 11:33:07 +00:00
|
|
|
|
2020-12-17 19:28:47 +00:00
|
|
|
# manpage requires building the vendored go-md2man
|
2024-04-30 08:26:14 +00:00
|
|
|
makeFlags = [ "bin/conmon" "VERSION=${version}" ];
|
2020-12-17 19:28:47 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-03-31 06:52:06 +00:00
|
|
|
runHook preInstall
|
2020-12-17 19:28:47 +00:00
|
|
|
install -D bin/conmon -t $out/bin
|
2021-03-31 06:52:06 +00:00
|
|
|
runHook postInstall
|
2020-12-17 19:28:47 +00:00
|
|
|
'';
|
2019-05-29 11:33:07 +00:00
|
|
|
|
2022-07-05 01:17:03 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
strictDeps = true;
|
|
|
|
|
2020-08-23 22:42:49 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) cri-o podman; };
|
2020-05-19 00:40:59 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-02-28 21:52:45 +00:00
|
|
|
changelog = "https://github.com/containers/conmon/releases/tag/${src.rev}";
|
2020-03-04 21:50:51 +00:00
|
|
|
homepage = "https://github.com/containers/conmon";
|
2019-05-29 11:33:07 +00:00
|
|
|
description = "An OCI container runtime monitor";
|
|
|
|
license = licenses.asl20;
|
2020-04-03 10:11:24 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
2019-05-29 11:33:07 +00:00
|
|
|
platforms = platforms.linux;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "conmon";
|
2019-05-29 11:33:07 +00:00
|
|
|
};
|
|
|
|
}
|