New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Emacs 27 derivation #65300
RFC: Emacs 27 derivation #65300
Conversation
Perhaps you could do something similar to https://github.com/colemickens/nixpkgs-wayland |
This version of Dump temacs in an empty environment to prevent -dev paths from ending
up in the dumped image.
diff --git a/src/Makefile.in b/src/Makefile.in
index fd05a45df5..13f529c253 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -570,7 +570,7 @@ emacs$(EXEEXT): temacs$(EXEEXT) \
lisp.mk $(etc)/DOC $(lisp) \
$(lispsource)/international/charprop.el ${charsets}
ifeq ($(DUMPING),unexec)
- LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
+ env -i LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
ifneq ($(PAXCTL_dumped),)
$(PAXCTL_dumped) emacs$(EXEEXT)
endif |
This expression works without duplicating the entire file: { pkgs ? import <nixpkgs> {}
, lib ? pkgs.lib
}:
let
rev = "dfb0ba79b5f41ca6fed25a03d2a5cd6996ec4753";
sha256 = "0cr8mlcxyib4rd8xj65hb1wxwlmppgg4823z7h3dbbxi273gz5b0";
in (pkgs.emacs.override { srcRepo = true; }).overrideAttrs(old: rec {
name = "emacs-${version}";
version = builtins.substring 0 7 rev;
src = pkgs.fetchFromGitHub {
owner = "emacs-mirror";
repo = "emacs";
inherit sha256 rev;
};
patches = [
./clean-env.patch
(lib.elemAt old.patches 1)
];
}) |
FYI I've pushed an auto-updating emacs to mine and @etu`s overlay https://github.com/adisbladis/exwm-overlay. |
Xaw3d = null; | ||
gconf = null; | ||
alsaLib = null; | ||
imagemagick = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support ImageMagick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in emacs 27 it's disabled by default, recent replaced by something else. I haven't actualy c hanged these options from what emacs26 called default.nix with anyways
++ lib.optional (withX && (withGTK3 || withXwidgets)) wrapGAppsHook; | ||
|
||
buildInputs = | ||
[ ncurses gconf libxml2 gnutls alsaLib acl gpm gettext ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based off of the NEWS
file, it looks like gmp
and jansson
should be added to buildInputs
.
gmp
: The build now requiresgmp
, but will fallback to using the includedminigmp
if it's not available. I'm thinking it would be better to usegmp
from nixpkgs.jansson
: Emacs now usesjansson
by default if it's available, for faster JSON parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! i've made this change
@ar1a I'd actually like to close this PR, if a user wants bleeding edge emacs we now have the emacs overlay: https://github.com/nix-community/emacs-overlay. Are you fine with this? |
works for me
…On Fri, Nov 1, 2019, 10:07 PM adisbladis ***@***.***> wrote:
@ar1a <https://github.com/ar1a> I'd actually like to close this PR, if a
user wants bleeding edge emacs we now have the emacs overlay:
https://github.com/nix-community/emacs-overlay.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#65300?email_source=notifications&email_token=ACALSJ7ERB3P45PALOKAF5LQRQEX7A5CNFSM4IGDVO7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC2UOIQ#issuecomment-548751138>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACALSJ3UNOHXNDNUHWETT5LQRQEX7ANCNFSM4IGDVO7A>
.
|
No love in emacs-overlay for macOS users :( |
@rcorrear I happily accept patches for macOS in the overlay. |
@adisbladis I was hoping no one would comment before I was finished building it, but I'll take back my comment, I didn't understand overlays well enough :) Took me a little while to figure out how to use them since the instructions (in your repo and almost everywhere else I found) are more tailored to NixOS users but not for (standalone) Nixpkgs users (which is what you get in macOS). If I do find anything I can contribute to emacs-overlay I will, I'm slowly learning about Nix and overlays are something I just came across. And yeah, I'm aware of emacsMacport not being ported yet to Emacs 27. Thanks for pointing that out though. |
Motivation for this change
Emacs 27 has a few desirable changes, like early-init.el and a native json parser (50x speed up). Unfortunately, it won't be released for a few months minimum, probably a year. I need help testing emacs, as it is so big. I also haven't checked if there any new compile options, etc, etc. This is all pretty overwhelming, so if you spot anything please let me know.
I am also wondering how we should version the release, because at a guess we can't ask for
master
revision because the sha256 will fail. Right now my plan was to just periodically update the rev and sha, but there's gotta be a better waaaaaaaaaaay.You can build it with
nix-build -A emacsHead
Changelog: https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)