From d09528373d7cbb0418e752405cac51bdae676a0c Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 13 Nov 2022 13:26:45 +0100 Subject: [PATCH] emacs.pkgs.ada-mode: fix build for version 7.3.1 Fixes breakage to ada-mode introduced in #200190. ada-mode recently gained a Makefile [1] which is intended for compiling it in the ELPA worktree. Building from the ELPA release tarball still needs to be done via build.sh, so we need to overwrite buildPhase to ignore the Makefile (previously it'd just do nothing). Additionally some new build tools are needed and lzip can be removed (as we no longer fetch an archived version of wisi from ELPA). [1]: https://git.savannah.gnu.org/cgit/emacs/elpa.git/commit/Makefile?h=externals/ada-mode&id=d5428433e39f3de7168fdc891127a2dcff849904 --- .../editors/emacs/elisp-packages/elpa-packages.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix index 94ca0cdf0b6d..3b19adfa1719 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix @@ -69,7 +69,7 @@ self: let then null else super.project; # Compilation instructions for the Ada executables: - # https://www.nongnu.org/ada-mode/ada-mode.html#Ada-executables + # https://www.nongnu.org/ada-mode/ ada-mode = super.ada-mode.overrideAttrs (old: { # actually unpack source of ada-mode and wisi # which are both needed to compile the tools @@ -85,15 +85,18 @@ self: let nativeBuildInputs = [ buildPackages.gnat buildPackages.gprbuild - buildPackages.lzip + buildPackages.dos2unix + buildPackages.re2c ]; buildInputs = [ pkgs.gnatcoll-xref ]; - preInstall = '' + buildPhase = '' + runHook preBuild ./build.sh -j$NIX_BUILD_CORES + runHook postBuild ''; postInstall = (old.postInstall or "") + "\n" + ''