Commit Graph

1326 Commits

Author SHA1 Message Date
github-actions[bot]
f5eedb3d13
Merge master into staging-next 2024-09-28 06:04:30 +00:00
R. Ryantm
22155c1541 emacsPackages.lsp-bridge: 0-unstable-2024-09-11 -> 0-unstable-2024-09-27 2024-09-27 18:59:38 +00:00
Jörg Thalheim
91ea06cb60 Merge remote-tracking branch 'upstream/master' into HEAD 2024-09-26 21:04:22 +02:00
Brian Leung
a755ead8ef
emacs: do not allow webkitgtk on Emacs >= 30
An incompatibility with newer versions of webkit2gtk was revealed
upstream (https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-09/msg00695.html).
2024-09-26 08:04:14 -07:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
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