Comments (4)
I think we need some more details, how are you using this expression, are you sure it is the result of this derivation that is used as your Emacs. If you do which emacs
what do you see. I have verified that this works, see:
$ nix-shell -p 'emacsGit.override { withXwidgets = true; withGTK3 = true; }' --run 'emacs -Q --batch --eval "(message \\"%s\\" (featurep \'xwidget-internal))"'
t
$ nix-shell -p 'emacsGit' --run 'emacs -Q --batch --eval "(message \\"%s\\" (featurep \'xwidget-internal))"'
nil
from emacs-overlay.
used simply as:
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
}))
];
....
systemPackages = with pkgs; [
(emacsGit.override {
withXwidgets = true;
withGTK3 = true;
})
[az@thinky:/etc/nixos]$ which emacs
/nix/var/nix/profiles/default/bin/emacs
and that emacs is 26
but I use
windowManager = {
session = lib.singleton {
name = "exwm";
start = ''
eval `dbus-launch --exit-with-session ${pkgs.emacsGit}/bin/emacs`
'';
};
};
and M-x version
shows GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0)
from emacs-overlay.
That explains it, if you refer to it as ${pkgs.emacsGit}
you are not using the overridden version of the package. Easiest is to provide another overlay that either overwrites the pkgs.emacsGit
or adds a new pkgs.emacsGitWithXwidgets
If you add another overlay, such as:
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
}))
(self: super: {
emacsGit = super.emacsGit.override {
withXwidgets = true;
withGTK3 = true;
};
})
];
....
systemPackages = with pkgs; [
emacsGit
then it should work.
or if you want to have both with/without Xwidgets you could define it as emacsGitWithXwidgets
in the overlay and then refer to that package instead of emacsGit
in both systemPackages
and windowManager start eval ${pkgs.emacsGitWithXwidgets}
.
The ugly solution that should also work would be:
windowManager = {
session = lib.singleton {
name = "exwm";
start = ''
eval `dbus-launch --exit-with-session ${pkgs.emacsGit.override { withXwidgets = true; withGTK3 = true; }}/bin/emacs`
'';
};
};
or
windowManager = let
emacs = pkgs.emacsGit.override {
withXwidgets = true;
withGTK3 = true;
};
in {
session = lib.singleton {
name = "exwm";
start = ''
eval `dbus-launch --exit-with-session ${emacs}/bin/emacs`
'';
};
};
Just to show that there is no specific magic going on, I hope this clarifies things a bit.
from emacs-overlay.
Closing since it seems this was a case of simple user-error :)
from emacs-overlay.
Related Issues (20)
- Can we confirm that *.elc files are bundled by mistake here ? HOT 2
- extraConfig (in homeManager.emacs) is ignored when using this overlay with a conig.el from path
- Potential cache miss when using emacs.pkgs.*
- Is it possible to disable the compilation of all the built-in emacs packages ? HOT 1
- Feature request: nongnu-devel support HOT 1
- Build fail when using Org mode file HOT 5
- How to debug the emacsWithPackagesFromUsePackage parser HOT 1
- automatic update not working HOT 7
- Export org to latex and opening them doesn't work
- bytecomp-revert patch fails on 5cd187 HOT 6
- When building with override to release 29.190, `native-comp-driver-options` patch breaks HOT 5
- Emacs30 version out of date by one month HOT 2
- Hash mismatch for geiser
- Error building emacs-pgtk 20240121.0 HOT 1
- Use emacsWithPackagesFromUsePackage with Doom Emacs, trying to apply a patch to a ELPA package HOT 17
- Site Lisp, wrappers, and achieving consistency with `invocation-directory`, `invocation-name`, and `process-environment` HOT 5
- commercial-emacs fails to build HOT 2
- Incorrect (?) hashes for sources in latest emacs-overlay HOT 18
- How do I use `pkgs.emacsWithPackagesFromUsePackage` to tangle init.el (and put it under ~/.config/emacs) from org config file?
- overrideScope is deprecated: Error on nixpkgs/23.05 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-overlay.