about summary refs log tree commit diff
path: root/pkgs/tools/system/lxc/default.nix
blob: 3d9e0f740b5c4c6a0686c2d53772a5c38a8bb0d9 (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
{stdenv, fetchurl, libcap}:

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

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

  patchPhase = ''
    sed -i -e '/ldconfig/d' src/lxc/Makefile.in
  '';

  configureFlags = [ "--localstatedir=/var" ];

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

  buildInputs = [ libcap ];

  meta = {
    homepage = http://lxc.sourceforge.net;
    description = "lxc Linux Containers userland tools";
    license = "LGPLv2.1+";
    platforms = stdenv.lib.platforms.linux;
  };
}