Merge pull request #204884 from lopsided98/btrfsutil-python
python3Packages.btrfsutil: build separately from btrfs-progs
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
{ lib, stdenv, fetchurl
|
||||
, pkg-config, python3, sphinx
|
||||
, pkg-config, sphinx
|
||||
, zstd
|
||||
, acl, attr, e2fsprogs, libuuid, lzo, udev, zlib
|
||||
, runCommand, btrfs-progs
|
||||
, gitUpdater
|
||||
, udevSupport ? true
|
||||
, enablePython ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -19,13 +18,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
] ++ lib.optionals enablePython [
|
||||
python3 python3.pkgs.setuptools
|
||||
] ++ [
|
||||
sphinx
|
||||
];
|
||||
|
||||
buildInputs = [ acl attr e2fsprogs libuuid lzo python3 udev zlib zstd ];
|
||||
buildInputs = [ acl attr e2fsprogs libuuid lzo udev zlib zstd ];
|
||||
|
||||
# gcc bug with -O1 on ARM with gcc 4.8
|
||||
# This should be fine on all platforms so apply universally
|
||||
@@ -35,18 +32,17 @@ stdenv.mkDerivation rec {
|
||||
install -v -m 444 -D btrfs-completion $out/share/bash-completion/completions/btrfs
|
||||
'';
|
||||
|
||||
configureFlags = lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"--disable-backtrace"
|
||||
] ++ lib.optionals (!enablePython) [
|
||||
configureFlags = [
|
||||
# Built separately, see python3Packages.btrfsutil
|
||||
"--disable-python"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"--disable-backtrace"
|
||||
] ++ lib.optionals (!udevSupport) [
|
||||
"--disable-libudev"
|
||||
];
|
||||
|
||||
makeFlags = [ "udevruledir=$(out)/lib/udev/rules.d" ];
|
||||
|
||||
installFlags = lib.optionals enablePython [ "install_python" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests = {
|
||||
|
||||
@@ -1430,7 +1430,7 @@ self: super: with self; {
|
||||
|
||||
btrfs = callPackage ../development/python-modules/btrfs { };
|
||||
|
||||
btrfsutil = toPythonModule (pkgs.btrfs-progs.override { python3 = self.python; });
|
||||
btrfsutil = callPackage ../development/python-modules/btrfsutil { };
|
||||
|
||||
btsocket = callPackage ../development/python-modules/btsocket { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user