lxc: Cleanup

This commit is contained in:
William A. Kennington III 2015-07-31 17:08:04 -07:00
parent 7a6b3bf688
commit 85e2c8ff23
2 changed files with 25 additions and 15 deletions

View File

@ -1,7 +1,9 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, perl, docbook2x { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, perl, docbook2x
, docbook_xml_dtd_45, systemd, wrapPython , docbook_xml_dtd_45, python3Packages
, libapparmor ? null, gnutls ? null, libseccomp ? null, cgmanager ? null
, libnih ? null, dbus ? null, libcap ? null, python3 ? null # Optional Dependencies
, libapparmor ? null, gnutls ? null, libselinux ? null, libseccomp ? null
, cgmanager ? null, libnih ? null, dbus ? null, libcap ? null, systemd ? null
}: }:
let let
@ -18,10 +20,12 @@ stdenv.mkDerivation rec {
sha256 = "149nq630h9bg87hb3cn086ci0cz29l7fp3i6qf1mqxv7hnildm8p"; sha256 = "149nq630h9bg87hb3cn086ci0cz29l7fp3i6qf1mqxv7hnildm8p";
}; };
nativeBuildInputs = [
autoreconfHook pkgconfig perl docbook2x python3Packages.wrapPython
];
buildInputs = [ buildInputs = [
autoreconfHook pkgconfig perl docbook2x systemd libapparmor gnutls libselinux libseccomp cgmanager libnih dbus libcap
libapparmor gnutls libseccomp cgmanager libnih dbus libcap python3 python3Packages.python systemd
wrapPython
]; ];
patches = [ ./support-db2x.patch ]; patches = [ ./support-db2x.patch ];
@ -31,17 +35,23 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--localstatedir=/var" "--localstatedir=/var"
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--with-rootfs-path=/var/lib/lxc/rootfs" "--enable-doc"
"--disable-api-docs"
] ++ optional (libapparmor != null) "--enable-apparmor" ] ++ optional (libapparmor != null) "--enable-apparmor"
++ optional (gnutls != null) "--enable-gnutls" ++ optional (libselinux != null) "--enable-selinux"
++ optional (libseccomp != null) "--enable-seccomp" ++ optional (libseccomp != null) "--enable-seccomp"
++ optional (enableCgmanager) "--enable-cgmanager"
++ optional (libcap != null) "--enable-capabilities" ++ optional (libcap != null) "--enable-capabilities"
++ [ ++ [
"--enable-doc" "--disable-examples"
"--enable-tests" "--enable-python"
"--disable-lua"
"--enable-bash"
(if doCheck then "--enable-tests" else "--disable-tests")
"--with-rootfs-path=/var/lib/lxc/rootfs"
]; ];
doCheck = false;
installFlags = [ installFlags = [
"localstatedir=\${TMPDIR}" "localstatedir=\${TMPDIR}"
"sysconfdir=\${out}/etc" "sysconfdir=\${out}/etc"
@ -50,7 +60,9 @@ stdenv.mkDerivation rec {
"LXCPATH=\${TMPDIR}/var/lib/lxc" "LXCPATH=\${TMPDIR}/var/lib/lxc"
]; ];
postInstall = "wrapPythonPrograms"; postInstall = ''
wrapPythonPrograms
'';
meta = { meta = {
homepage = "http://lxc.sourceforge.net"; homepage = "http://lxc.sourceforge.net";

View File

@ -2140,9 +2140,7 @@ let
lshw = callPackage ../tools/system/lshw { }; lshw = callPackage ../tools/system/lshw { };
lxc = callPackage ../os-specific/linux/lxc { lxc = callPackage ../os-specific/linux/lxc { };
wrapPython = python3Packages.wrapPython;
};
lzip = callPackage ../tools/compression/lzip { }; lzip = callPackage ../tools/compression/lzip { };