GithubHelp home page GithubHelp logo

Comments (4)

terlar avatar terlar commented on June 18, 2024

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.

11111000000 avatar 11111000000 commented on June 18, 2024

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.

terlar avatar terlar commented on June 18, 2024

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.

adisbladis avatar adisbladis commented on June 18, 2024

Closing since it seems this was a case of simple user-error :)

from emacs-overlay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.