summary refs log tree commit diff
path: root/pkgs/os-specific/linux/lxc/default.nix
blob: 8f60ff2554bfc7a04c26cb9b1e33bddf8aebf3cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ stdenv, fetchurl, libcap, apparmor, perl, docbook2x, docbook_xml_dtd_45 }:

stdenv.mkDerivation rec {
  name = "lxc-0.8.0";

  src = fetchurl {
    url = "http://lxc.sf.net/download/lxc/${name}.tar.gz";
    sha256 = "0b3912mal1n56i1v5f3aplm7shqnlz24p0znpva27r4l1drk7j7a";
  };

  buildInputs = [ libcap apparmor perl docbook2x ];

  patches = [
   ./dont-run-ldconfig.patch
   ./fix-documentation-build.patch
   ./fix-sgml-documentation.patch
  ];

  preConfigure = "export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml";

  configureFlags = "--localstatedir=/var";

  postInstall = ''
    cd "$out/lib"
    lib=liblxc.so.?.*
    ln -s $lib $(echo $lib | sed -re 's/(liblxc[.]so[.].)[.].*/\1/')
  '';

  meta = {
    homepage = "http://lxc.sourceforge.net";
    description = "lightweight virtual system mechanism";
    license = stdenv.lib.licenses.lgpl21Plus;

    longDescription = ''
      LXC is the userspace control package for Linux Containers, a
      lightweight virtual system mechanism sometimes described as
      "chroot on steroids". LXC builds up from chroot to implement
      complete virtual systems, adding resource management and isolation
      mechanisms to Linux’s existing process management infrastructure.
    '';

    platforms = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.simons ];
  };
}