summary refs log tree commit diff
path: root/pkgs/tools/filesystems/nixpart/0.4/default.nix
blob: bdf0a5c4323d5bbb2b81988e3f6e1a90fd13adef (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{ stdenv, fetchurl, python, buildPythonApplication
# Propagated to blivet
, useNixUdev ? true
# No longer needed, but kept for backwards-compatibility with older NixOps.
, udevSoMajor ? null
# Propagated dependencies
, pkgs, urlgrabber
}:

let
  blivet = import ./blivet.nix {
    inherit stdenv fetchurl buildPythonApplication;
    inherit pykickstart pyparted pyblock cryptsetup multipath_tools;
    inherit useNixUdev;
    inherit (pkgs) lsof utillinux libudev;
    libselinux = pkgs.libselinux.override { enablePython = true; };
  };

  cryptsetup = import ./cryptsetup.nix {
    inherit stdenv fetchurl python;
    inherit (pkgs) pkgconfig libgcrypt libuuid popt;
    devicemapper = lvm2;
  };

  dmraid = import ./dmraid.nix {
    inherit stdenv fetchurl;
    devicemapper = lvm2;
  };

  lvm2 = import ./lvm2.nix {
    inherit stdenv fetchurl;
    inherit (pkgs) pkgconfig utillinux libudev systemd coreutils;
  };

  multipath_tools = import ./multipath-tools.nix {
    inherit stdenv fetchurl lvm2;
    inherit (pkgs) readline systemd libaio gzip;
  };

  parted = import ./parted.nix {
    inherit stdenv fetchurl;
    inherit (pkgs) utillinux readline libuuid gettext check;
    devicemapper = lvm2;
  };

  pyblock = import ./pyblock.nix {
    inherit stdenv fetchurl python lvm2 dmraid;
  };

  pykickstart = import ./pykickstart.nix {
    inherit stdenv fetchurl python buildPythonApplication urlgrabber;
  };

  pyparted = import ./pyparted.nix {
    inherit stdenv fetchurl python buildPythonApplication parted;
    inherit (pkgs) pkgconfig e2fsprogs;
  };

in buildPythonApplication rec {
  name = "nixpart-${version}";
  version = "0.4.1";

  src = fetchurl {
    url = "https://github.com/aszlig/nixpart/archive/v${version}.tar.gz";
    sha256 = "0avwd8p47xy9cydlbjxk8pj8q75zyl68gw2w6fnkk78dcb1a3swp";
  };

  propagatedBuildInputs = [ blivet ];

  doCheck = false;

  meta = {
    description = "NixOS storage manager/partitioner";
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = [ stdenv.lib.maintainers.aszlig ];
    platforms = stdenv.lib.platforms.linux;
  };
}