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 | |
parent | 9bc1e429d022727f988fdbed89b1ef4ad44f149e (diff) | |
download | nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.tar nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.tar.gz nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.tar.bz2 nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.tar.lz nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.tar.xz nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.tar.zst nixpkgs-66f8529d91e8104d6535a42e0400bebeab0d2411.zip |
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-*`.
-rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix | 33 | ||||
-rw-r--r-- | pkgs/top-level/emacs-packages.nix | 2 |
2 files changed, 33 insertions, 2 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix index 69db13fec19..2fcfa9b84dd 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; diff --git a/pkgs/top-level/emacs-packages.nix b/pkgs/top-level/emacs-packages.nix index 4d4c172296a..3fa2d2ea5dc 100644 --- a/pkgs/top-level/emacs-packages.nix +++ b/pkgs/top-level/emacs-packages.nix @@ -26,7 +26,7 @@ let mkElpaPackages = { pkgs, lib }: import ../applications/editors/emacs/elisp-packages/elpa-packages.nix { - inherit (pkgs) stdenv texinfo writeText gcc; + inherit (pkgs) stdenv texinfo writeText gcc pkgs buildPackages; inherit lib; }; |