34 libblockdevPython = (libblockdev.override { python3 = python; }).python;
36 buildPythonPackage rec {
39 format = "setuptools";
41 src = fetchFromGitHub {
42 owner = "storaged-project";
44 tag = "blivet-${version}";
45 hash = "sha256-X5U6XFmcsTfetpxwH0ONSnTasnwh2USukYtx+8HwVGc=";
49 find blivet -name '*.py' | while IFS= read -r i ; do
50 substituteInPlace "$i" \
52 'gi.require_version("BlockDev",' \
54 gi.require_version("GIRepository", "2.0")
55 from gi.repository import GIRepository
56 GIRepository.Repository.prepend_search_path("${libblockdev}/lib/girepository-1.0")
57 gi.require_version("BlockDev",'
61 propagatedBuildInputs = [
89 pythonImportsCheck = [ "blivet" ];
91 # Even unit tests require a system D-Bus.
92 # TODO: Write a NixOS VM test?
95 # Fails with: TypeError: don't know how to make test from:
96 # <blivet.static_data.luks_data.LUKS_Data object at 0x7ffff4a34b90>
97 dontUseSetuptoolsCheck = true;
100 description = "Python module for system storage configuration";
101 homepage = "https://github.com/storaged-project/blivet";
103 lib.licenses.gpl2Plus
104 lib.licenses.lgpl2Plus
106 maintainers = with lib.maintainers; [ cybershadow ];
107 platforms = lib.platforms.linux;