nixpkgs/pkgs/development/python-modules/btrfsutil/default.nix
Ben Wolsieffer e21aa200b5 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.
2022-12-06 19:06:04 -05:00

27 lines
543 B
Nix

{ 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 ];
};
}