diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2022-12-06 18:56:58 -0500 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2022-12-06 19:06:04 -0500 |
commit | e21aa200b5d988d0bf359579740904f4f108940a (patch) | |
tree | a3ed11026074d828b8b3524d7dd8b9f32fc5ca03 /pkgs/development/python-modules | |
parent | 84c17bc98f0a2ee9394339082c20decb03325c04 (diff) |
python3Packages.btrfsutil: build separately from btrfs-progs
btrfs-progs was installing its Python bindings as an egg, which doesn't work with Nix. It turns out that there is no real benefit to building the Python bindings as part of the btrfs-progs package. Instead, we can just package them separately, and use nixpkgs' normal Python packaging support to install them as a wheel. This fixes the bindings and reduces closure sizes.
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/btrfsutil/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/btrfsutil/default.nix b/pkgs/development/python-modules/btrfsutil/default.nix new file mode 100644 index 0000000000000..d529ec09c7058 --- /dev/null +++ b/pkgs/development/python-modules/btrfsutil/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildPythonPackage +, btrfs-progs +}: +buildPythonPackage { + pname = "btrfsutil"; + inherit (btrfs-progs) version src; + format = "setuptools"; + + buildInputs = [ btrfs-progs ]; + + preConfigure = '' + cd libbtrfsutil/python + ''; + + # No tests + doCheck = false; + pythonImportsCheck = [ "btrfsutil" ]; + + meta = with lib; { + description = "Library for managing Btrfs filesystems"; + homepage = "https://btrfs.wiki.kernel.org/"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ raskin lopsided98 ]; + }; +} |