diff options
author | William A. Kennington III <william@wkennington.com> | 2015-03-26 17:54:25 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-03-26 18:16:43 -0700 |
commit | 26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7 (patch) | |
tree | b2c7d6974d6336b6e164e0b1fea9bf5dac886cd9 /pkgs/os-specific/linux/lxc/default.nix | |
parent | 702590081b67a2f0dfc2744150741466eddd4344 (diff) | |
download | nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.tar nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.tar.gz nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.tar.bz2 nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.tar.lz nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.tar.xz nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.tar.zst nixlib-26c7e2605ed7d8b9bcff55d7311ec7f3a4d427a7.zip |
lxc: 1.0.7 -> 1.1.1
Diffstat (limited to 'pkgs/os-specific/linux/lxc/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/lxc/default.nix | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix index 97f80b53032b..9939a5525747 100644 --- a/pkgs/os-specific/linux/lxc/default.nix +++ b/pkgs/os-specific/linux/lxc/default.nix @@ -1,38 +1,63 @@ -{ stdenv, autoreconfHook, fetchurl, libcap, libapparmor, perl, docbook2x -, docbook_xml_dtd_45, gnutls, pkgconfig +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, perl, docbook2x +, docbook_xml_dtd_45, systemd +, libapparmor ? null, gnutls ? null, libseccomp ? null, cgmanager ? null +, libnih ? null, dbus ? null, libcap ? null }: +let + enableCgmanager = cgmanager != null && libnih != null && dbus != null; +in +with stdenv.lib; stdenv.mkDerivation rec { - name = "lxc-1.0.7"; + name = "lxc-1.1.1"; - src = fetchurl { - url = "http://github.com/lxc/lxc/archive/${name}.tar.gz"; - sha256 = "1wm8n1b8j3x37757h2yyz53k3b6r2r301fmkviqf4xp0jaav1cd0"; + src = fetchFromGitHub { + owner = "lxc"; + repo = "lxc"; + rev = name; + sha256 = "04zpznd364862y3dwn97klvwfw9i2b6n1lh4fkci0z74c6z9svql"; }; - buildInputs = [ libcap libapparmor perl docbook2x gnutls autoreconfHook pkgconfig ]; + buildInputs = [ + autoreconfHook pkgconfig perl docbook2x systemd + libapparmor gnutls libseccomp cgmanager libnih dbus libcap + ]; - patches = [ ./install-localstatedir-in-store.patch ./support-db2x.patch ]; + patches = [ ./support-db2x.patch ]; - preConfigure = '' - export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml - substituteInPlace doc/rootfs/Makefile.am --replace '@LXCROOTFSMOUNT@' '$out/lib/lxc/rootfs' - substituteInPlace configure.ac --replace '$sysconfdir/' '/etc/' - substituteInPlace configure.ac --replace '$${sysconfdir}/' '/etc/' - ''; + XML_CATALOG_FILES = "${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml"; configureFlags = [ "--localstatedir=/var" + "--sysconfdir=/etc" "--with-rootfs-path=/var/lib/lxc/rootfs" + ] ++ optional (libapparmor != null) "--enable-apparmor" + ++ optional (gnutls != null) "--enable-gnutls" + ++ optional (libseccomp != null) "--enable-seccomp" + ++ optional (enableCgmanager) "--enable-cgmanager" + ++ optional (libcap != null) "--enable-capabilities" + ++ [ "--enable-doc" "--enable-tests" - "--enable-apparmor" ]; + installFlags = [ "DESTDIR=\${out}" ]; + + postInstall = '' + mv $out/$out/* $out + DIR=$out/$out + while rmdir $DIR 2>/dev/null; do + DIR="$(dirname "$DIR")" + done + + # Remove the unneeded var/lib directories + rm -rf $out/var + ''; + meta = { homepage = "http://lxc.sourceforge.net"; description = "userspace tools for Linux Containers, a lightweight virtualization system"; - license = stdenv.lib.licenses.lgpl21Plus; + license = licenses.lgpl21Plus; longDescription = '' LXC is the userspace control package for Linux Containers, a @@ -42,7 +67,7 @@ stdenv.mkDerivation rec { mechanisms to Linux’s existing process management infrastructure. ''; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.simons ]; + platforms = platforms.linux; + maintainers = with maintainers; [ simons wkennington ]; }; } |