From b0f4ae64c29289d024d22767b9ca0d582cf1db3e Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 24 Jun 2013 10:22:03 +0200 Subject: [PATCH] python-packages: Add blivet version 0.16-1. This still doesn't have all possibly required dependencies, but at least we can do basic partitioning, which is our primary goal. At least when it comes to the Hetzner target of nixops. But even for partitioning when installing NixOS this library could be _very_ useful. Test cases currently don't work because they're filled with syntax errors and some references to the mocking library are missing. As you can see in propagatedBuildInputs, here are the promised overrides for Python support of libselinux and cryptsetup. Signed-off-by: aszlig --- pkgs/top-level/python-packages.nix | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 08d62f87055d..6aa12fdf3ae7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -451,6 +451,44 @@ pythonPackages = python.modules // rec { }; + blivet = buildPythonPackage rec { + name = "blivet-${version}"; + version = "0.16-1"; + + src = fetchurl { + url = "https://git.fedorahosted.org/cgit/blivet.git/snapshot/" + + "${name}.tar.bz2"; + sha256 = "0gfxf86sc0mkpqjcainch6gqh3r7brgma85pbl4nfpzmylhzj5sg"; + }; + + postPatch = '' + sed -i -e '/find_library/,/find_library/ { + c libudev = "${pkgs.udev}/lib/libudev.so.1" + }' blivet/pyudev.py + sed -i -e 's|"multipath"|"${pkgs.multipath_tools}/sbin/multipath"|' \ + blivet/devicelibs/mpath.py blivet/devices.py + ''; + + propagatedBuildInputs = let + pyenable = { enablePython = true; }; + selinuxWithPython = pkgs.libselinux.override pyenable; + cryptsetupWithPython = pkgs.cryptsetup.override pyenable; + in [ + pykickstart pyparted pkgs.udev pyblock + selinuxWithPython cryptsetupWithPython + ]; + + # tests are currently _heavily_ broken upstream + doCheck = false; + + meta = { + homepage = "https://fedoraproject.org/wiki/Blivet"; + description = "Module for management of a system's storage configuration"; + license = [ "GPLv2+" "LGPLv2.1+" ]; + }; + }; + + # euca2ools (and maybe Nova) needs boto 1.9, 2.0 doesn't work. boto_1_9 = buildPythonPackage (rec { name = "boto-1.9b";