about summary refs log tree commit diff
path: root/pkgs/development/libraries/libinput
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-01-28 20:06:49 +0100
committerJan Tojnar <jtojnar@gmail.com>2022-01-28 20:07:28 +0100
commit818de15e48953cf0a3ffc65ae42d07ffe83acca7 (patch)
treedef4fe463f48dfb25579eb8671624539c5bbfe6e /pkgs/development/libraries/libinput
parent1e144d4d087eb9d751e6a776aafa6b08c34cf331 (diff)
libinput: fix docs build
Diffstat (limited to 'pkgs/development/libraries/libinput')
-rw-r--r--pkgs/development/libraries/libinput/default.nix27
1 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix
index 30919baf5c04c..89bdc15ff62c1 100644
--- a/pkgs/development/libraries/libinput/default.nix
+++ b/pkgs/development/libraries/libinput/default.nix
@@ -11,6 +11,7 @@
 , documentationSupport ? false
 , doxygen
 , graphviz
+, runCommand
 , eventGUISupport ? false
 , cairo
 , glib
@@ -26,19 +27,19 @@ let
   mkFlag = optSet: flag: "-D${flag}=${lib.boolToString optSet}";
 
   sphinx-build =
-    python3.pkgs.sphinx.overrideAttrs (attrs: {
-      propagatedBuildInputs =
-        attrs.propagatedBuildInputs
-        ++ (with python3.pkgs; [
-          recommonmark
-          sphinx_rtd_theme
-        ]);
-
-      postFixup = attrs.postFixup or "" + ''
-        # Do not propagate Python
-        rm $out/nix-support/propagated-build-inputs
-      '';
-    });
+    let
+      env = python3.withPackages (pp: with pp; [
+        sphinx
+        recommonmark
+        sphinx_rtd_theme
+      ]);
+    in
+    # Expose only the sphinx-build binary to avoid contaminating
+    # everything with Sphinx’s Python environment.
+    runCommand "sphinx-build" { } ''
+      mkdir -p "$out/bin"
+      ln -s "${env}/bin/sphinx-build" "$out/bin"
+    '';
 in
 
 stdenv.mkDerivation rec {