From 818de15e48953cf0a3ffc65ae42d07ffe83acca7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 28 Jan 2022 20:06:49 +0100 Subject: [PATCH] libinput: fix docs build --- .../libraries/libinput/default.nix | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 30919baf5c04..89bdc15ff62c 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 {