From cdf4aef5e2ad2c50872f8948656f21df9e8325f4 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 28 Jul 2024 08:46:02 +0800 Subject: [PATCH] emacs: handle propagatedBuildInputs correctly for genericBuild Without this patch, if there is propagatedBuildInputs in the arguments of genericBuild, it will override the value set by genericBuild. With this patch applied, the argument and the value set by genericBuild are merged instead. --- pkgs/applications/editors/emacs/build-support/generic.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/build-support/generic.nix b/pkgs/applications/editors/emacs/build-support/generic.nix index 16632e97eca0..d529d3cf09f9 100644 --- a/pkgs/applications/editors/emacs/build-support/generic.nix +++ b/pkgs/applications/editors/emacs/build-support/generic.nix @@ -4,7 +4,7 @@ let inherit (lib) optionalAttrs; - handledArgs = [ "buildInputs" "nativeBuildInputs" "packageRequires" "propagatedUserEnvPkgs" "meta" ] + handledArgs = [ "buildInputs" "nativeBuildInputs" "packageRequires" "propagatedBuildInputs" "propagatedUserEnvPkgs" "meta" ] ++ lib.optionals (emacs.withNativeCompilation or false) [ "postInstall" ]; setupHook = writeText "setup-hook.sh" '' @@ -28,6 +28,7 @@ in , buildInputs ? [] , nativeBuildInputs ? [] , packageRequires ? [] +, propagatedBuildInputs ? [] , propagatedUserEnvPkgs ? [] , postInstall ? "" , meta ? {} @@ -57,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: ({ buildInputs = packageRequires ++ buildInputs; nativeBuildInputs = [ emacs texinfo ] ++ nativeBuildInputs; - propagatedBuildInputs = packageRequires; + propagatedBuildInputs = packageRequires ++ propagatedBuildInputs; propagatedUserEnvPkgs = packageRequires ++ propagatedUserEnvPkgs; inherit setupHook;