From 9069a064f8a8ae0896cda6343464a076599dbcb5 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 7 Oct 2022 16:31:39 +0300 Subject: [PATCH 1/3] libxml2: enable strictDeps and enable pythonSupport when cross --- pkgs/development/libraries/libxml2/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 474afc4ba6ca2..3fe272591e109 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -12,7 +12,7 @@ , ncurses , findXMLCatalogs , libiconv -, pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform +, pythonSupport ? enableShared , icuSupport ? false , icu , enableShared ? stdenv.hostPlatform.libc != "msvcrt" && !stdenv.hostPlatform.isStatic @@ -60,6 +60,8 @@ stdenv.mkDerivation rec { }) ]; + strictDeps = true; + nativeBuildInputs = [ pkg-config autoreconfHook @@ -94,7 +96,8 @@ stdenv.mkDerivation rec { (lib.enableFeature enableStatic "static") (lib.enableFeature enableShared "shared") (lib.withFeature icuSupport "icu") - (lib.withFeatureAs pythonSupport "python" python) + (lib.withFeature pythonSupport "python") + (lib.optionalString pythonSupport "PYTHON=${python.pythonForBuild.interpreter}") ]; installFlags = lib.optionals pythonSupport [ From 8e43dec8bae3ab15f6214a9b6261a925ee1880e8 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 7 Oct 2022 16:52:01 +0300 Subject: [PATCH 2/3] libxslt: enable strictDeps and enable pythonSupport when cross --- pkgs/development/libraries/libxslt/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 29c6938911622..fda00f6766648 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -10,7 +10,7 @@ , ncurses , libgcrypt , cryptoSupport ? false -, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform +, pythonSupport ? true , gnome }: @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { sha256 = "EoSPCkQI9ltTDTlizZ/2cLaueWGRz+/zdSK1dy3o3I4="; }; + strictDeps = true; + nativeBuildInputs = [ pkg-config autoreconfHook @@ -51,7 +53,8 @@ stdenv.mkDerivation rec { "--without-debug" "--without-mem-debug" "--without-debugger" - (lib.withFeatureAs pythonSupport "python" python) + (lib.withFeature pythonSupport "python") + (lib.optionalString pythonSupport "PYTHON=${python.pythonForBuild.interpreter}") ] ++ lib.optionals (!cryptoSupport) [ "--without-crypto" ]; From 09226fffcf076f976a9915ec7b9db12f5b2594a3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 7 Oct 2022 19:26:22 +0300 Subject: [PATCH 3/3] nixosOptionsDoc: buildInputs -> nativeBuildInputs to make strictDepsByDefault work --- nixos/lib/make-options-doc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 6a1bb868c20de..9a75956b0d695 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -122,7 +122,7 @@ in rec { optionsJSON = pkgs.runCommand "options.json" { meta.description = "List of NixOS options in JSON format"; - buildInputs = [ + nativeBuildInputs = [ pkgs.brotli (let self = (pkgs.python3Minimal.override {