2015-12-17 13:12:49 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
# Updating
|
|
|
|
|
2016-04-26 20:06:42 +01:00
|
|
|
To update the list of packages from MELPA,
|
2015-12-17 13:12:49 +00:00
|
|
|
|
2019-08-18 10:41:40 +01:00
|
|
|
1. Run `./update-elpa`.
|
2021-05-21 04:25:09 +01:00
|
|
|
2. Check for evaluation errors:
|
2021-09-06 20:45:27 +01:00
|
|
|
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate ../../../../../ -A emacs.pkgs.elpaPackages
|
2021-05-21 00:03:41 +01:00
|
|
|
3. Run `git commit -m "elpa-packages $(date -Idate)" -- elpa-generated.nix`
|
2015-12-17 13:12:49 +00:00
|
|
|
|
2020-05-11 13:51:46 +01:00
|
|
|
## Update from overlay
|
|
|
|
|
|
|
|
Alternatively, run the following command:
|
|
|
|
|
|
|
|
./update-from-overlay
|
|
|
|
|
|
|
|
It will update both melpa and elpa packages using
|
2021-05-21 00:03:41 +01:00
|
|
|
https://github.com/nix-community/emacs-overlay. It's almost instantenous and
|
|
|
|
formats commits for you.
|
2020-05-11 13:51:46 +01:00
|
|
|
|
2015-12-17 13:12:49 +00:00
|
|
|
*/
|
|
|
|
|
2021-07-22 13:47:01 +01:00
|
|
|
{ lib, stdenv, texinfo, writeText, gcc, pkgs, buildPackages }:
|
2015-12-06 15:27:19 +00:00
|
|
|
|
2019-08-18 10:47:42 +01:00
|
|
|
self: let
|
2015-12-06 15:27:19 +00:00
|
|
|
|
2019-08-18 10:47:42 +01:00
|
|
|
markBroken = pkg: pkg.override {
|
|
|
|
elpaBuild = args: self.elpaBuild (args // {
|
|
|
|
meta = (args.meta or {}) // { broken = true; };
|
|
|
|
});
|
|
|
|
};
|
2016-01-15 03:52:31 +00:00
|
|
|
|
2021-05-21 00:03:41 +01:00
|
|
|
elpaBuild = import ../../../../build-support/emacs/elpa.nix {
|
2021-06-24 18:33:40 +01:00
|
|
|
inherit lib stdenv texinfo writeText gcc;
|
2019-08-18 10:47:42 +01:00
|
|
|
inherit (self) emacs;
|
|
|
|
};
|
2016-01-15 03:52:31 +00:00
|
|
|
|
2021-11-08 17:07:11 +00:00
|
|
|
# Use custom elpa url fetcher with fallback/uncompress
|
|
|
|
fetchurl = buildPackages.callPackage ./fetchelpa.nix { };
|
|
|
|
|
2019-08-18 10:47:42 +01:00
|
|
|
generateElpa = lib.makeOverridable ({
|
|
|
|
generated ? ./elpa-generated.nix
|
|
|
|
}: let
|
2015-12-15 17:57:51 +00:00
|
|
|
|
2019-08-18 10:47:42 +01:00
|
|
|
imported = import generated {
|
2021-08-06 22:26:09 +01:00
|
|
|
callPackage = pkgs: args: self.callPackage pkgs (args // {
|
2021-11-08 17:07:11 +00:00
|
|
|
inherit fetchurl;
|
2021-08-06 22:26:09 +01:00
|
|
|
});
|
2015-12-15 17:57:51 +00:00
|
|
|
};
|
|
|
|
|
2019-08-18 10:47:42 +01:00
|
|
|
super = removeAttrs imported [ "dash" ];
|
2015-12-16 14:13:46 +00:00
|
|
|
|
2016-01-15 03:52:31 +00:00
|
|
|
overrides = {
|
2017-11-20 22:12:11 +00:00
|
|
|
rcirc-menu = markBroken super.rcirc-menu; # Missing file header
|
2016-03-21 20:36:39 +00:00
|
|
|
cl-lib = null; # builtin
|
2016-04-26 20:09:33 +01:00
|
|
|
tle = null; # builtin
|
2019-04-08 09:26:33 +01:00
|
|
|
advice = null; # builtin
|
2019-12-03 20:04:08 +00:00
|
|
|
seq = if lib.versionAtLeast self.emacs.version "27"
|
|
|
|
then null
|
|
|
|
else super.seq;
|
2021-03-09 18:15:13 +00:00
|
|
|
project = if lib.versionAtLeast self.emacs.version "28"
|
|
|
|
then null
|
|
|
|
else super.project;
|
2021-07-22 13:47:01 +01:00
|
|
|
# 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
|
2021-08-16 20:32:45 +01:00
|
|
|
dontUnpack = false;
|
2021-07-22 13:47:01 +01:00
|
|
|
srcs = [
|
|
|
|
super.ada-mode.src
|
2021-11-08 17:07:11 +00:00
|
|
|
self.wisi.src
|
2021-07-22 13:47:01 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = "ada-mode-${self.ada-mode.version}";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
buildPackages.gnat
|
|
|
|
buildPackages.gprbuild
|
2021-08-06 21:24:46 +01:00
|
|
|
buildPackages.lzip
|
2021-07-22 13:47:01 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.gnatcoll-xref
|
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''
|
2021-08-06 21:32:57 +01:00
|
|
|
./build.sh -j$NIX_BUILD_CORES
|
2021-07-22 13:47:01 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
./install.sh --prefix=$out
|
|
|
|
'';
|
2021-08-18 01:00:44 +01:00
|
|
|
|
|
|
|
meta = old.meta // {
|
|
|
|
maintainers = [ lib.maintainers.sternenseemann ];
|
|
|
|
};
|
2021-07-22 13:47:01 +01:00
|
|
|
});
|
2015-12-16 14:13:46 +00:00
|
|
|
};
|
2016-01-15 03:52:31 +00:00
|
|
|
|
|
|
|
elpaPackages = super // overrides;
|
|
|
|
|
2019-08-18 10:47:42 +01:00
|
|
|
in elpaPackages // { inherit elpaBuild; });
|
|
|
|
|
|
|
|
in generateElpa { }
|