1{ lib, stdenv, fetchFromGitHub, pam, bison, flex, autoreconfHook }:
2
3stdenv.mkDerivation rec {
4 pname = "libcgroup";
5 version = "3.0";
6
7 src = fetchFromGitHub {
8 owner = pname;
9 repo = pname;
10 rev = "v${version}";
11 fetchSubmodules = true;
12 hash = "sha256-x2yBqpr3LedtWmpZ4K1ipZxIualNJuDtC4FVGzzcQn8=";
13 };
14
15 nativeBuildInputs = [ autoreconfHook bison flex ];
16 buildInputs = [ pam ];
17
18 postPatch = ''
19 substituteInPlace src/tools/Makefile.am \
20 --replace 'chmod u+s' 'chmod +x'
21 '';
22
23 meta = {
24 description = "Library and tools to manage Linux cgroups";
25 homepage = "https://github.com/libcgroup/libcgroup";
26 license = lib.licenses.lgpl2;
27 platforms = lib.platforms.linux;
28 maintainers = [ lib.maintainers.thoughtpolice ];
29 };
30}