From 1605472a15e6031fa13a84f35cc9d95a638a237d Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Tue, 17 May 2022 19:44:28 -0400 Subject: [PATCH 1/2] btrfs-progs: install Python bindings btrfs-progs currently builds the Python bindings for libbtrfsutil but doesn't actually install them. With this patch, the bindings are installed and exposed as python3Packages.btrfsutil. --- pkgs/tools/filesystems/btrfs-progs/default.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index f9e5340802ed..a1b9d2084fe0 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -38,6 +38,8 @@ stdenv.mkDerivation rec { makeFlags = lib.optionals stdenv.hostPlatform.isGnu [ "udevruledir=$(out)/lib/udev/rules.d" ]; + installFlags = [ "install_python" ]; + enableParallelBuilding = true; passthru.tests = { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e25e0968fa7d..b6734a5cbdc7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1407,6 +1407,8 @@ in { btrfs = callPackage ../development/python-modules/btrfs { }; + btrfsutil = toPythonModule (pkgs.btrfs-progs.override { python3 = self.python; }); + bugsnag = callPackage ../development/python-modules/bugsnag { }; bugwarrior = callPackage ../development/python-modules/bugwarrior { }; From b3445aff661c814a5661413ae12406d4d4130e17 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Tue, 17 May 2022 19:53:44 -0400 Subject: [PATCH 2/2] btrfs-progs: remove obsolete _PYTHON_HOST_PLATFORM This is set automatically by the CPython setup hook. --- pkgs/tools/filesystems/btrfs-progs/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index a1b9d2084fe0..9d68d4fa272c 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -23,9 +23,6 @@ stdenv.mkDerivation rec { buildInputs = [ acl attr e2fsprogs libuuid lzo python3 zlib zstd ] ++ lib.optionals stdenv.hostPlatform.isGnu [ udev ]; - # for python cross-compiling - _PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config; - # gcc bug with -O1 on ARM with gcc 4.8 # This should be fine on all platforms so apply universally postPatch = "sed -i s/-O1/-O2/ configure";