From e09aa2ed43d789b3eabe0e51f045965b262136e7 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Mon, 25 Dec 2023 14:10:12 +0000 Subject: [PATCH] libblockdev: split out Python bindings Allow overriding Python without requiring that the entire dependency graph (e.g. udisks) to be built against that Python. --- pkgs/development/libraries/libblockdev/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libblockdev/default.nix b/pkgs/development/libraries/libblockdev/default.nix index 7679aefe5b95..6e0f9858f730 100644 --- a/pkgs/development/libraries/libblockdev/default.nix +++ b/pkgs/development/libraries/libblockdev/default.nix @@ -40,12 +40,18 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-WCMedMkaMMhZbB3iJu3c+CTT3AvOjzOSYP45J+NQEDQ="; }; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" "devdoc" "python" ]; postPatch = '' patchShebangs scripts + substituteInPlace src/python/gi/overrides/Makefile.am \ + --replace-fail ''\'''${exec_prefix}' '@PYTHON_EXEC_PREFIX@' ''; + configureFlags = [ + "--with-python_prefix=${placeholder "python"}" + ]; + nativeBuildInputs = [ autoconf-archive autoreconfHook