git.iko.soy/typeable/nixpkgs
on master help sign in
blivet: Update to new upstream version 0.67.

Put a copy of old version 0.17 expression into 0.17.nix and update the pointers from nixpart0 accordingly. This also means, that plain nixpart is now way more broken than nixpart0 (we might want to temporarily fix 0.4 anyway). Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commitcb2c34f1bb8245a4460cef9f82301a76ab60441c authoraszlig <aszlig@redmoonstudios.org> dateWed 22 Oct 2014, 01:37 (12 years ago) parent7deadbb
5 files changed+85−40
nixos/tests/partition.nix+1−1 pkgs/development/python-modules/blivet/0.17.nix+58 pkgs/development/python-modules/blivet/default.nix+18−28 pkgs/tools/filesystems/nixpart/default.nix+3−10 pkgs/top-level/python-packages.nix+5−1
nixos/tests/partition.nix+1−1
@@ -67,7 +67,7 @@ in {
6767
6868 machine = { config, pkgs, ... }: {
6969 environment.systemPackages = [
70− pkgs.pythonPackages.nixpart
70+ pkgs.pythonPackages.nixpart0
7171 pkgs.file pkgs.btrfsProgs pkgs.xfsprogs pkgs.lvm2
7272 ];
7373 virtualisation.emptyDiskImages = [ 4096 4096 ];
pkgs/development/python-modules/blivet/0.17.nixnew file+58
@@ -0,0 +1,58 @@
1+{ stdenv, fetchurl, buildPythonPackage, pykickstart, pyparted, pyblock
2+, libselinux, cryptsetup, multipath_tools, lsof, utillinux
3+, useNixUdev ? true, udev ? null
4+# This is only used when useNixUdev is false
5+, udevSoMajor ? 1
6+}:
7+
8+assert useNixUdev -> udev != null;
9+
10+let
11+ pyenable = { enablePython = true; };
12+ selinuxWithPython = libselinux.override pyenable;
13+ cryptsetupWithPython = cryptsetup.override pyenable;
14+in buildPythonPackage rec {
15+ name = "blivet-${version}";
16+ version = "0.17-1";
17+
18+ src = fetchurl {
19+ url = "https://git.fedorahosted.org/cgit/blivet.git/snapshot/"
20+ + "${name}.tar.bz2";
21+ sha256 = "1k3mws2q0ryb7422mml6idmaasz2i2v6ngyvg6d976dx090qnmci";
22+ };
23+
24+ postPatch = ''
25+ sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \
26+ blivet/devicelibs/mpath.py blivet/devices.py
27+ sed -i -e '/"wipefs"/ {
28+ s|wipefs|${utillinux}/sbin/wipefs|
29+ s/-f/--force/
30+ }' blivet/formats/__init__.py
31+ sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
32+ sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py
33+ sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
34+ '' + (if useNixUdev then ''
35+ sed -i -e '/find_library/,/find_library/ {
36+ c libudev = "${udev}/lib/libudev.so.1"
37+ }' blivet/pyudev.py
38+ '' else ''
39+ sed -i \
40+ -e '/^somajor *=/s/=.*/= ${toString udevSoMajor}/p' \
41+ -e 's|common =.*|& + ["/lib/x86_64-linux-gnu", "/lib/i686-linux-gnu"]|' \
42+ blivet/pyudev.py
43+ '');
44+
45+ propagatedBuildInputs = [
46+ pykickstart pyparted pyblock selinuxWithPython cryptsetupWithPython
47+ ] ++ stdenv.lib.optional useNixUdev udev;
48+
49+ # tests are currently _heavily_ broken upstream
50+ doCheck = false;
51+
52+ meta = {
53+ homepage = "https://fedoraproject.org/wiki/Blivet";
54+ description = "Module for management of a system's storage configuration";
55+ license = [ "GPLv2+" "LGPLv2.1+" ];
56+ platforms = stdenv.lib.platforms.linux;
57+ };
58+}
pkgs/development/python-modules/blivet/default.nix+18−28
@@ -1,52 +1,42 @@
1−{ stdenv, fetchurl, buildPythonPackage, pykickstart, pyparted, pyblock
2−, libselinux, cryptsetup, multipath_tools, lsof, utillinux
3−, useNixUdev ? true, udev ? null
4−# This is only used when useNixUdev is false
5−, udevSoMajor ? 1
1+{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock
2+, pyudev, six, libselinux, cryptsetup, multipath_tools, lsof, utillinux
63}:
74
8−assert useNixUdev -> udev != null;
9−
105let
116 pyenable = { enablePython = true; };
127 selinuxWithPython = libselinux.override pyenable;
138 cryptsetupWithPython = cryptsetup.override pyenable;
149in buildPythonPackage rec {
1510 name = "blivet-${version}";
16− version = "0.17-1";
11+ version = "0.67";
1712
18− src = fetchurl {
19− url = "https://git.fedorahosted.org/cgit/blivet.git/snapshot/"
20− + "${name}.tar.bz2";
21− sha256 = "1k3mws2q0ryb7422mml6idmaasz2i2v6ngyvg6d976dx090qnmci";
13+ src = fetchFromGitHub {
14+ owner = "dwlehman";
15+ repo = "blivet";
16+ rev = name;
17+ sha256 = "1gk94ghjrxfqnx53hph1j2s7qcv86fjz48is7l099q9c24rjv8ky";
2218 };
2319
2420 postPatch = ''
25− sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \
26− blivet/devicelibs/mpath.py blivet/devices.py
21+ sed -i \
22+ -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \
23+ -e '/^def set_friendly_names/a \ return False' \
24+ blivet/devicelibs/mpath.py
2725 sed -i -e '/"wipefs"/ {
2826 s|wipefs|${utillinux}/sbin/wipefs|
2927 s/-f/--force/
3028 }' blivet/formats/__init__.py
3129 sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
3230 sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py
33− sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
34− '' + (if useNixUdev then ''
35− sed -i -e '/find_library/,/find_library/ {
36− c libudev = "${udev}/lib/libudev.so.1"
37− }' blivet/pyudev.py
38− '' else ''
39− sed -i \
40− -e '/^somajor *=/s/=.*/= ${toString udevSoMajor}/p' \
41− -e 's|common =.*|& + ["/lib/x86_64-linux-gnu", "/lib/i686-linux-gnu"]|' \
42− blivet/pyudev.py
43− '');
31+ sed -i -e '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
32+ '';
4433
4534 propagatedBuildInputs = [
46− pykickstart pyparted pyblock selinuxWithPython cryptsetupWithPython
47− ] ++ stdenv.lib.optional useNixUdev udev;
35+ pykickstart pyparted pyblock pyudev selinuxWithPython cryptsetupWithPython
36+ six
37+ ];
4838
49− # tests are currently _heavily_ broken upstream
39+ # Tests in <nixos/tests/blivet.nix> coming soon.
5040 doCheck = false;
5141
5242 meta = {
pkgs/tools/filesystems/nixpart/default.nix+3−10
@@ -1,13 +1,6 @@
1−{ stdenv, fetchurl, buildPythonPackage, blivet
2−# Propagated to blivet
3−, useNixUdev ? null, udevSoMajor ? null
4−}:
1+{ stdenv, fetchurl, buildPythonPackage, blivet }:
52
6−let
7− blivetOverrides = stdenv.lib.filterAttrs (k: v: v != null) {
8− inherit useNixUdev udevSoMajor;
9− };
10−in buildPythonPackage rec {
3+buildPythonPackage rec {
114 name = "nixpart-${version}";
125 version = "0.4.1";
136
@@ -16,7 +9,7 @@ in buildPythonPackage rec {
169 sha256 = "0avwd8p47xy9cydlbjxk8pj8q75zyl68gw2w6fnkk78dcb1a3swp";
1710 };
1811
19− propagatedBuildInputs = [ (blivet.override blivetOverrides) ];
12+ propagatedBuildInputs = [ blivet ];
2013
2114 doCheck = false;
2215
pkgs/top-level/python-packages.nix+5−1
@@ -65,6 +65,8 @@ let
6565
6666 blivet = callPackage ../development/python-modules/blivet { };
6767
68+ blivet_0_17 = callPackage ../development/python-modules/blivet/0.17.nix { };
69+
6870 dbus = callPackage ../development/python-modules/dbus {
6971 dbus = pkgs.dbus;
7072 };
@@ -123,7 +125,9 @@ let
123125
124126 # This is used for NixOps to make sure we won't break it with the next major
125127 # version of nixpart.
126− nixpart0 = callPackage ../tools/filesystems/nixpart/0.4.nix { };
128+ nixpart0 = callPackage ../tools/filesystems/nixpart/0.4.nix {
129+ blivet = self.blivet_0_17;
130+ };
127131
128132 pitz = callPackage ../applications/misc/pitz { };
129133