mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
e21aa200b5
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.
27 lines
543 B
Nix
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 ];
|
|
};
|
|
}
|