From 702590081b67a2f0dfc2744150741466eddd4344 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 26 Mar 2015 18:11:39 -0700 Subject: [PATCH] cgmanager: Add derivation --- pkgs/os-specific/linux/cgmanager/default.nix | 36 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/os-specific/linux/cgmanager/default.nix diff --git a/pkgs/os-specific/linux/cgmanager/default.nix b/pkgs/os-specific/linux/cgmanager/default.nix new file mode 100644 index 000000000000..79be500a13d7 --- /dev/null +++ b/pkgs/os-specific/linux/cgmanager/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, pkgconfig, libnih, dbus }: + +stdenv.mkDerivation rec { + name = "cgmanager-0.36"; + + src = fetchurl { + url = "https://linuxcontainers.org/downloads/cgmanager/${name}.tar.gz"; + sha256 = "039azd4ghpmiccd95ki8fna321kccapff00rib6hrdgg600pyw7l"; + }; + + buildInputs = [ pkgconfig libnih dbus ]; + + configureFlags = [ + "--with-init-script=systemd" + "--sysconfdir=/etc/" + "--localstatedir=/var" + ]; + + installFlags = [ "DESTDIR=\${out}" ]; + + postInstall = '' + mv $out/$out/* $out + DIR=$out/$out + while rmdir $DIR 2>/dev/null; do + DIR="$(dirname "$DIR")" + done + ''; + + meta = with stdenv.lib; { + homepage = https://linuxcontainers.org/cgmanager/introduction/; + description = "a central privileged daemon that manages all your cgroups"; + license = licenses.lgpl21; + platforms = platforms.linux; + maintainers = with maintainers; [ wkennington ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8f25d37dd62d..3e6d3fdd5f52 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8682,6 +8682,8 @@ let busybox = callPackage ../os-specific/linux/busybox { }; + cgmanager = callPackage ../os-specific/linux/cgmanager { }; + checkpolicy = callPackage ../os-specific/linux/checkpolicy { }; checksec = callPackage ../os-specific/linux/checksec { };