Commit Graph

1370 Commits

Author SHA1 Message Date
Lin Jian
6978cd6424
emacs28-gtk2: remove (#343355) 2024-09-25 02:22:37 +08:00
Lin Jian
8e8484cdcf
emacsPackages: fix build for a few hundred packages (#343925) 2024-09-24 14:45:03 +08:00
Lin Jian
207d89c1e7
emacsPackages."@": fix build 2024-09-24 10:51:49 +08:00
Lin Jian
2bd38b4f38
emacsPackages.bbdb: fix build 2024-09-23 22:27:22 +08:00
Lin Jian
8ae08e01c2
emacsPackages.psgml: fix build 2024-09-23 17:37:08 +08:00
Lin Jian
2f7cc5a781
emacsPackages: respect turnCompilationWarningToError and ignoreCompilationError at bytecompile time
Previously, these two attributes were only respected at nativecompile
time.
2024-09-23 17:36:55 +08:00
Lin Jian
bc2ab9c42c
emacsPackages: fix build for melpa packages 2024-09-23 15:27:06 +08:00
Lin Jian
fc9502ff29
emacsPackages: fix build for elpa packages 2024-09-23 15:26:52 +08:00
Lin Jian
e48a0365d2
emacsPackages: fix build for nongnu packages 2024-09-23 14:54:24 +08:00
Lin Jian
656c68d654
emacsPackages: add more override helpers
- addPackageRequires
- addPackageRequiresIfOlder
- addPackageRequiresWhen
- fixRequireHelmCore
- ignoreCompilationError
- ignoreCompilationErrorIfOlder
- ignoreCompilationErrorWhen
- mkHomeIfOlder
- mkHomeWhen
2024-09-23 14:54:07 +08:00
Lin Jian
466727b821
emacsPackages.session-management-for-emacs: ignore compilation error 2024-09-23 14:53:59 +08:00
Lin Jian
98ac76b79c
emacsPackages.color-theme-solarized: ignore native compilation error 2024-09-23 14:53:44 +08:00
Lin Jian
5176727b63
emacsPackages.gn-mode-from-sources: stop setting ignoreCompilationError
It defaults to false now.
2024-09-23 14:53:35 +08:00
Lin Jian
84d59c02ec
emacsPackages.consult-gh: stop setting ignoreCompilationError
It defaults to false now.
2024-09-23 14:53:19 +08:00
Lin Jian
d3e9e03e54
emacsPackages.cask: stop setting ignoreCompilationError
It defaults to false now.
2024-09-23 14:53:01 +08:00
Lin Jian
35ff4b6a64
emacsPackages.tsc: stop setting ignoreCompilationError
It defaults to false now.
2024-09-23 14:52:33 +08:00
Lin Jian
4686df865c
Revert "emacs: let nix build for manualPackages fail if native-comp fails"
This reverts commit 2421239d66.

ignoreCompilationError defaults to false now.
2024-09-23 14:51:17 +08:00
Fabián Heredia Montiel
909a1ceb58 Merge remote-tracking branch 'origin/master' into staging-next 2024-09-22 22:39:25 -06:00
Lin Jian
154e2c9da0
emacsPackages.gnuplot: replace program (#343696) 2024-09-23 09:49:48 +08:00
Daniel Nagy
10c8d2b894
emacsPackages.zstd: init at 0-unstable-2020-06-03 2024-09-22 18:00:00 +02:00
Daniel Nagy
84adfb9386
emacsPackages.gnuplot: replace program 2024-09-22 12:30:00 +02:00
github-actions[bot]
94770996ae
Merge master into staging-next 2024-09-22 00:15:32 +00:00
Lin Jian
10e742c427
emacsPackages.gnuplot-mode: replace program (#343482) 2024-09-22 07:50:57 +08:00
Daniel Nagy
8027f6cfd5
emacsPackages.age: replace program 2024-09-21 22:15:00 +02:00
github-actions[bot]
d3ae261fc3
Merge master into staging-next 2024-09-21 12:05:16 +00:00
Daniel Nagy
20a40db7eb
emacsPackages.gnuplot-mode: replace program 2024-09-21 13:30:00 +02:00
Daniel Nagy
f7ed0918af
emacsPackages.zig-mode: replace program 2024-09-21 12:00:00 +02:00
Lin Jian
bfb2d3647c
emacs: fix elisp native compilation errors caused by load-path (#343238) 2024-09-21 10:21:14 +08:00
Lin Jian
78f30b83c6
emacs: respect native compilation errors by default
In other words, native compilation errors make nix build fail by
default now.
2024-09-21 08:19:05 +08:00
Anderson Torres
91fc27ded9 emacs28-gtk2: remove
Hey, is this the only code that touches GTK2 here?
2024-09-20 18:15:39 -03:00
Lin Jian
dd5b181c9c
emacs: make trivialBuild know its elisp dependencies in another way (#343201) 2024-09-21 01:32:20 +08:00
Lin Jian
079f5497c3
emacs: make sure the pinned package-build is used (#343200) 2024-09-21 01:30:06 +08:00
Lin Jian
47b62f5785
emacs: fix elisp native compilation errors caused by load-path
If $pname-$version/foo.el requires $pname-$version/bar-dir/bar.el,
previously there were native compilation errors like the below one
because $pname-$version/bar-dir was not added to load-path (only
$pname-$version is added).

Error: file-missing ("/nix/store/hash-emacs-sly-20240809.2119/share/emacs/site-lisp/elpa/sly-20240809.2119/contrib/sly-mrepl.el" "Cannot open load file" "No such file or directory" "sly-autodoc")

Currently, these packages are affected: haskell-tng-mode[^1],
psgml[3], sly[4], ess[5], el-get[6], proof-general[7], hyperbole[8]
and edts[9].

At run time, we recursively[1] add[2] $pname-$version and its subdirs
to load-path.  Let's also do that at build time to fix this kind of
errors.

[1]: 9625766c32/pkgs/applications/editors/emacs/site-start.el (L18)
[2]: 9625766c32/pkgs/applications/editors/emacs/build-support/wrapper.nix (L170-L175)
[3]: https://hydra.nixos.org/build/271291118/nixlog/1
[4]: https://hydra.nixos.org/build/271372072/nixlog/1
[5]: https://hydra.nixos.org/build/271284390/nixlog/1
[6]: https://hydra.nixos.org/build/271385904/nixlog/1
[7]: https://hydra.nixos.org/build/271277707/nixlog/1
[8]: https://hydra.nixos.org/build/271345526/nixlog/1
[9]: https://hydra.nixos.org/build/271290054/nixlog/1
[^1]: Errors of this kind are shadowed by other errors.
2024-09-20 18:59:22 +08:00
Lin Jian
49a9fd3f16
emacs: make sure the pinned package-build is used
package-build is also in MELPA.  Currently, two packages depend on
it.  When building such a package, package-build is added to
EMACSLOADPATH by the setup hook.  Previously, package-initialize is
called in the buildPhase of melpaBuild, which may cause package-build
from MELPA to be used instead of the pinned one depending on the
entries of EMACSLOADPATH.

This patch removes the unneeded package-initialize to make sure the
pinned package-build is used.

Accidentally, this patch reduces build time of emacsPackages from 30
minutes to 24 minutes on my machine.
2024-09-20 15:31:04 +08:00
Lin Jian
4092c0d850
emacs: make trivialBuild know its elisp dependencies in another way
Previously, trivialBuild did not know how to find its elisp
dependencies.  This was[1] fixed[2] by basically rewriting part of
package-activate-all in bash.

I think it is better to call package-activate-all (or
package-initialize if Emacs is old) directly.  It reduces maintenance
burden a bit.  It also improves consistency since elpaBuild and
melpaBuild already do so.

This change provides almost the same functionality as before.  It only
breaks elisp packages with non-standard[^3] elisp dependencies.
However, I think those non-standard ones should be fixed instead.
As an example, mu4e used to be a non-standard one and was fixed[4].

This change does not cause more build failures in emacsPackages.

[1]: https://github.com/NixOS/nixpkgs/pull/82604
[2]: bf486f784d
[^3]: Non-standard elisp packages do not meet requirements of
package.el, the builtin package manager of Emacs.  Usually, they are
installed to $out/share/emacs/site-lisp/$pname-$version and/or miss a
$pname-pkg.el file.
[4]: https://github.com/NixOS/nixpkgs/pull/253438
2024-09-20 15:19:45 +08:00
K900
d8a54461fc Merge remote-tracking branch 'origin/staging-next' into staging 2024-09-20 07:27:56 +03:00
h7x4
9a6c76c4af
treewide: remove unused inputs (#342672) 2024-09-19 20:36:18 +02:00
github-actions[bot]
81d645b6a9
Merge staging-next into staging 2024-09-18 06:05:20 +00:00
Peder Bergebakken Sundt
8c8c27bb19 treewide: remove unused inputs 2024-09-18 01:00:07 +02:00
Anderson Torres
afb9fff177 emacs: jansson is now optional
Since it is not needed in Emacs 30+.
2024-09-17 16:09:10 -03:00
Anderson Torres
b585a1d35e emacs30: init 2024-09-17 15:09:38 -03:00
Anderson Torres
2238a5a1d0 emacs: use lib.getDev to get harfbuzz 2024-09-17 15:09:38 -03:00
K900
b24e9a53ca Merge remote-tracking branch 'origin/staging-next' into staging 2024-09-17 09:07:34 +03:00
Lin Jian
b20bede431
emacs: make sure native compilation output dir is in $out (#342212) 2024-09-17 09:59:51 +08:00
Fabián Heredia Montiel
a284754bae emacs: drop GConf dependency 2024-09-16 12:40:10 -06:00
github-actions[bot]
1eb2a0e2d5
Merge staging-next into staging 2024-09-16 18:04:57 +00:00
Lin Jian
e623501bd1
emacs: add elisp package override helper mkHome
Some packages, such as auctex[1], need a writable $HOME when being
compiled.

[1]: https://hydra.nixos.org/build/271252219/nixlog/1
2024-09-17 00:31:27 +08:00
Lin Jian
da025fca60
emacsPackages.gn-mode-from-sources: add maintainer (#342253) 2024-09-17 00:26:07 +08:00
Bojun Ren
53944b1be1
emacsPackages.gn-mode-from-sources: add rennsax to maintainers 2024-09-17 00:12:00 +08:00
Kira Bruneau
6fe50b656f
emacsPackages.lsp-bridge: 0-unstable-2024-09-05 -> 0-unstable-2024-09-11 (#342241) 2024-09-16 08:38:50 -04:00
github-actions[bot]
1c3463dc7a
Merge staging-next into staging 2024-09-16 12:06:19 +00:00
R. Ryantm
be9c27343c emacsPackages.lsp-bridge: 0-unstable-2024-09-05 -> 0-unstable-2024-09-11 2024-09-16 08:45:48 +00:00
Lin Jian
05ea720237
emacs.pkgs.gn-mode: init (#342124) 2024-09-16 16:29:50 +08:00
github-actions[bot]
1c4acc409e
Merge staging-next into staging 2024-09-16 06:05:33 +00:00
Lin Jian
13e80707b2
emacs: make sure native compilation output dir is in $out
Native compilation output dir is the first writable one specified
by native-comp-eln-load-path[1].  The first[2] dir in
native-comp-eln-load-path is in $HOME.  In the nix build sandbox,
$HOME normally does not exist so this first dir is not writable.  The
second dir is in $out and thus is writable.  So it is chosen as the
native compilation output dir.

Some packages, such as auctex[3], needs a writable $HOME when being
compiled.  To avoid compilation error, it is necessary to create a
writable $HOME.  To make sure native compilation output dir is in
$out, we can make the first dir of native-comp-eln-load-path, the one
in $HOME, read-only.  Or we can explicitly choose the second dir.
This patch use the second explicit method.

[1]: (info "(elisp) Native-Compilation Functions")
[2]: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el?id=f27553c30a772a0103d2e6762e4d7f588f302e4b#n615
[3]: https://hydra.nixos.org/build/271252219/nixlog/1
2024-09-16 13:15:02 +08:00
Anderson Torres
93424a6ca5 emacs.pkgs.gn-mode-from-sources: init 2024-09-15 22:47:44 -03:00
Lin Jian
13cdb0775b
emacsPackages.eglot: only build info manual when needed 2024-09-16 09:42:12 +08:00
Lin Jian
05d1238642
emacs: do not do native compilation for .dir-locals.el
This file is not a valid Emacs lisp file.

Some packages, such as auctex, el-get, helm and org, include this file
without using no-byte-compile in file-local variables to skip native
compilation, causing native compilation error like this:

Wrong type argument: "/nix/store/<hash>-emacs-org-9.7.10/share/emacs/site-lisp/elpa/org-9.7.10/.dir-locals.el", proper-list-p, (#<symbol org-edit-src-content-indentation at 304> . 0)

Some[1,2,3] of them decide to exclude this file.  Org includes this
file intendedly[4] but may add no-byte-compile to file-local
variables.  Hopefully, newer versions of them do not have this error.
However, to support old versions of them and potentially other new
packages with this problem, let's filter out this file in Nixpkgs.

[1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73215
[2]: https://github.com/melpa/melpa/pull/9164
[3]: https://github.com/melpa/melpa/pull/9165
[4]: https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00179.html
2024-09-16 09:06:10 +08:00
github-actions[bot]
7aea2e99a8
Merge staging-next into staging 2024-09-16 00:14:57 +00:00
Lin Jian
8acaf55d0a
emacsPackages.mu4e: add linj to maintainers 2024-09-16 05:21:41 +08:00
Lin Jian
859dde2eb5
emacsPackages.mu4e: stop setting wrong meta.mainProgram 2024-09-16 05:13:25 +08:00
Lin Jian
be4319b918
emacsPackages.mu4e: build package tarball in postBuild instead 2024-09-16 05:12:57 +08:00
Lin Jian
16f8c53652
emacsPackages.mu4e: make pname and version overridable 2024-09-16 05:10:55 +08:00
Lin Jian
980f840859
emacs: factor out elisp package override helpers 2024-09-16 04:42:31 +08:00
github-actions[bot]
dd01ad2d69
Merge staging-next into staging 2024-09-15 06:04:53 +00:00
Lin Jian
b541a6ed85
emacs: move more elpaPackages overrides to common overrides (#341912) 2024-09-15 10:32:34 +08:00
Lin Jian
084801b70d
emacs.pkgs.ligo-mode: remove (#341919) 2024-09-15 10:30:06 +08:00
Lin Jian
f739c0bbd8
melpa-packages: remove condition about null in helper functions
This is a follow up of [1].  With that PR applied, packages will not
be null.

[1]: https://github.com/NixOS/nixpkgs/pull/83378
2024-09-15 06:35:13 +08:00
Lin Jian
1344d10200
emacs.pkgs.ligo-mode: remove
This package was in melpaPackages.  Then, it was moved[1] to
manualPackages to workaround failure of MELPA update.  Then, it was
removed[2] from MELPA.

To reduce maintenance burden, let's also remove it.

[1]: https://github.com/NixOS/nixpkgs/pull/227531
[2]: c8a86d223f (commitcomment-130288082)
2024-09-15 06:03:08 +08:00
Lin Jian
043efd2f19
emacsPackages.xeft: remove redundant NIX_CFLAGS_COMPILE
NIX_CFLAGS_COMPILE will be added by the CXX wrapper.
2024-09-15 04:08:25 +08:00
Lin Jian
2f63405c2e
emacs.pkgs.elpaPackages.plz: move to common overrides 2024-09-15 04:06:37 +08:00
Lin Jian
27ac489399
emacs.pkgs.elpaPackages.jinx: move to common overrides 2024-09-15 04:06:37 +08:00
Lin Jian
6ed5ec71bf
emacs.pkgs.elpaPackages.ada-mode: move to common overrides 2024-09-15 04:06:35 +08:00
Lin Jian
b525bba371
emacs.pkgs.elpaPackages: move builtin packages to common overrides 2024-09-15 03:49:13 +08:00
Lin Jian
64fc1f5170
emacs.pkgs.elpaDevelPackages.pq: move to common overrides 2024-09-15 03:49:00 +08:00
github-actions[bot]
70ab79847d
Merge staging-next into staging 2024-09-14 18:04:45 +00:00
github-actions[bot]
6c321f0183
Merge staging-next into staging 2024-09-14 06:04:58 +00:00
Lin Jian
e2479ad6d8
emacs: factor out common overrides for nongnu packages 2024-09-14 13:49:44 +08:00
Lin Jian
9928ed446d
emacs: factor out common overrides for elpa packages 2024-09-14 13:04:08 +08:00
Lin Jian
3a1334f7f9
elpa-(devel-)package: stop excluding dash
dash was excluded[1] in 2016 because it was outdated.  I do not see
why it should still be excluded now.

[1]: 727a9ddea8
2024-09-14 07:15:56 +08:00
K900
4e803e9656 Merge remote-tracking branch 'origin/staging-next' into staging 2024-09-12 07:00:07 +03:00
Daniel Nagy
9343905733
emacsPackages.units-mode: replace program 2024-09-10 22:30:00 +02:00
Maximilian Marx
685864af83 emacs.pkgs.melpaPackages.ttl-mode: update recipe
Signed-off-by: Maximilian Marx <mmarx@wh2.tu-dresden.de>
2024-09-09 19:13:03 +02:00
Maximilian Marx
c51ca826ce
melpa2nix: update to work with current MELPA recipes
MELPA has started to use :rename in the :files attribute of
recipes (e.g., for bbdb), which is rejected as an invalid recipe by
earlier versions of package-build.
2024-09-09 11:59:51 +02:00
github-actions[bot]
f2b767ea43
Merge master into staging-next 2024-09-09 00:14:38 +00:00
Daniel Nagy
d5511a8c52
emacsPackages.ormolu: replace program 2024-09-08 22:30:00 +02:00
github-actions[bot]
5a5ebe5a1c
Merge master into staging-next 2024-09-07 18:04:01 +00:00
R. Ryantm
b13b8bf3cd emacsPackages.lsp-bridge: 0-unstable-2024-08-17 -> 0-unstable-2024-09-05 2024-09-05 14:02:42 +00:00
K900
23b4832da0 Merge remote-tracking branch 'origin/master' into staging-next 2024-09-04 08:53:48 +03:00
Anderson Torres
eb93347a3b emacsPackages.cask: 0.8.8 -> 0.9.0 2024-09-03 16:30:08 -03:00
Anderson Torres
78bf14b807 emacsPackages.cask: use melpaBuild
- use a patch that parameterizes lispdir
  - so that we can get rid of SRCDIR and other dependencies
- finalAttrs
- remove failing doCheck
- sei ignoreCompilationError to false
- meta.mainProgram
- meta.homepage points to GitHub
  - because the previous is outdated
- nixfmt-rfc-style
2024-09-03 16:04:45 -03:00
Lin Jian
ad0aa8e34d
emacs: set foundMakefile in buildPhase of elisp builders
foundMakefile is used[1] in stdenv checkPhase.

[1]: 12228ff175/pkgs/stdenv/generic/setup.sh (L1471-L1475)
2024-09-01 20:51:40 +08:00
github-actions[bot]
4420fe8b58
Merge staging-next into staging 2024-08-28 12:05:53 +00:00
github-actions[bot]
42531ffc56
Merge master into staging-next 2024-08-28 12:05:25 +00:00
Lin Jian
63bec82989
emacs: make melpaBuild accept recipe content as a string (#334955) 2024-08-28 16:35:58 +08:00
Lin Jian
d3894eda50
emacsPackages.lspce: 1.1.0-unstable-2024-07-14 -> 1.1.0-unstable-2024-07-29 (#331497) 2024-08-28 16:31:30 +08:00
github-actions[bot]
a0418f66a3
Merge master into staging-next 2024-08-28 06:04:54 +00:00
Lin Jian
edbeaa802c
emacsPackages.consult-gh: set ignoreCompilationError to false
Closes: https://github.com/NixOS/nixpkgs/issues/335411
2024-08-27 12:47:45 +08:00
R. Ryantm
b7881a15ff
emacsPackages.consult-gh: 1.0-unstable-2024-08-11 -> 1.0-unstable-2024-08-24 2024-08-27 12:47:26 +08:00
github-actions[bot]
7241849967
Merge master into staging-next 2024-08-26 06:04:26 +00:00