diff options
author | 7c6f434c <7c6f434c@mail.ru> | 2022-12-07 09:35:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 09:35:13 +0000 |
commit | 7ffd8e25b8f43e618ab4db8a332a44bab994233b (patch) | |
tree | 96506b9450f37d4b24c90b5f0df826d443216aa4 /pkgs | |
parent | f60bcce66d83451bd6f1e6dc5240f200aa2e1891 (diff) | |
parent | e21aa200b5d988d0bf359579740904f4f108940a (diff) |
Merge pull request #204884 from lopsided98/btrfsutil-python
python3Packages.btrfsutil: build separately from btrfs-progs
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/btrfsutil/default.nix | 26 | ||||
-rw-r--r-- | pkgs/tools/filesystems/btrfs-progs/default.nix | 16 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 33 insertions, 11 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 ]; + }; +} diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index ee1bea9c29ef9..e01ee2a8cf47a 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -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 = { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 266c47548ac0d..1ccfa77283c6f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { }; |