diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-07-22 14:47:01 +0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-08-03 14:58:49 +0200 |
commit | 66f8529d91e8104d6535a42e0400bebeab0d2411 (patch) | |
tree | 0d18d38f2c3e72879e99671fe50a7629d31af01e /pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix | |
parent | 9bc1e429d022727f988fdbed89b1ef4ad44f149e (diff) |
emacsPackages.ada-mode: build tools needed at runtime
ada-mode includes extra binaries which are used by it at runtime. They require gnat, gprbuild, gnatcoll-core and wisi's source checked out in `../wisi-*`.
Diffstat (limited to 'pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix')
-rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix index 69db13fec19e2..2fcfa9b84dde3 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix @@ -21,7 +21,7 @@ formats commits for you. */ -{ lib, stdenv, texinfo, writeText, gcc }: +{ lib, stdenv, texinfo, writeText, gcc, pkgs, buildPackages }: self: let @@ -57,6 +57,37 @@ self: let project = if lib.versionAtLeast self.emacs.version "28" then null else super.project; + # Compilation instructions for the Ada executables: + # https://www.nongnu.org/ada-mode/ada-mode.html#Ada-executables + ada-mode = super.ada-mode.overrideAttrs (old: { + # actually unpack source of ada-mode and wisi + # which are both needed to compile the tools + # we need at runtime + phases = "unpackPhase " + old.phases; # not a list, interestingly… + srcs = [ + super.ada-mode.src + self.wisi.src + ]; + + sourceRoot = "ada-mode-${self.ada-mode.version}"; + + nativeBuildInputs = [ + buildPackages.gnat + buildPackages.gprbuild + ]; + + buildInputs = [ + pkgs.gnatcoll-xref + ]; + + preInstall = '' + ./build.sh + ''; + + postInstall = '' + ./install.sh --prefix=$out + ''; + }); }; elpaPackages = super // overrides; |