From ad0aa8e34d25f8f9263527a76ae26f3c28b00881 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 31 Aug 2024 19:28:04 +0800 Subject: [PATCH] emacs: set foundMakefile in buildPhase of elisp builders foundMakefile is used[1] in stdenv checkPhase. [1]: https://github.com/NixOS/nixpkgs/blob/12228ff1752d7b7624a54e9c1af4b222b3c1073b/pkgs/stdenv/generic/setup.sh#L1471-L1475 --- pkgs/applications/editors/emacs/build-support/melpa.nix | 5 +++++ pkgs/applications/editors/emacs/build-support/trivial.nix | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkgs/applications/editors/emacs/build-support/melpa.nix b/pkgs/applications/editors/emacs/build-support/melpa.nix index bda412a0957f..e129e3ebdeb0 100644 --- a/pkgs/applications/editors/emacs/build-support/melpa.nix +++ b/pkgs/applications/editors/emacs/build-support/melpa.nix @@ -126,6 +126,11 @@ EOF buildPhase = args.buildPhase or '' runHook preBuild + # This is modified from stdenv buildPhase. foundMakefile is used in stdenv checkPhase. + if [[ ! ( -z "''${makeFlags-}" && -z "''${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ) ]]; then + foundMakefile=1 + fi + pushd "$NIX_BUILD_TOP" emacs --batch -Q \ diff --git a/pkgs/applications/editors/emacs/build-support/trivial.nix b/pkgs/applications/editors/emacs/build-support/trivial.nix index 2c20b0567c68..8c515363f427 100644 --- a/pkgs/applications/editors/emacs/build-support/trivial.nix +++ b/pkgs/applications/editors/emacs/build-support/trivial.nix @@ -14,6 +14,11 @@ args: buildPhase = args.buildPhase or '' runHook preBuild + # This is modified from stdenv buildPhase. foundMakefile is used in stdenv checkPhase. + if [[ ! ( -z "''${makeFlags-}" && -z "''${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ) ]]; then + foundMakefile=1 + fi + emacs -L . --batch -f batch-byte-compile *.el runHook postBuild