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";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.1.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-iSC1Q7fdf+4YH4vLFPOscRWxNv/xygYx872u8msmMmc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-09-23 15:35:13 +00:00
|
|
|
buildInputs = [ glib libseccomp systemd ]
|
2023-10-09 19:29:22 +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
|
2024-05-15 15:35:15 +00:00
|
|
|
makeFlags = [ "bin/conmon" "VERSION=${version}" ];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
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; {
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/containers/conmon/releases/tag/${src.rev}";
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "conmon";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|