This commit is contained in:
Aleksandr Lebedev 2025-07-25 22:01:40 +02:00
parent f3880c6f9f
commit 97ca185951
2 changed files with 9 additions and 4 deletions

6
flake.lock generated
View file

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1753376867,
"narHash": "sha256-FAPCW/szK3qvCUD+ThOX4sFyqz/MSadJ4SltA8lNamc=",
"lastModified": 1753460825,
"narHash": "sha256-MNu9l5nukxFpT5LzsT7Q83BqmO36EByn6/o/xA7hu7I=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "b8df6094952273f3b7e5e7c99b96ed1bf9830034",
"rev": "07c08ea0037b2fd7e0b5416361586d4552ac8255",
"type": "github"
},
"original": {

View file

@ -1,6 +1,7 @@
{
pkgs,
withLsps ? false,
native ? false,
...
}: let
preTangledFile = pkgs.writeText "config.org" ''
@ -32,7 +33,11 @@
# };
defaultInitFile = true;
# Package is optional, defaults to pkgs.emacs
package = pkgs.emacs30-pgtk;
package = if native then pkgs.emacs30-pgtk.overrideAttrs (
oldAttrs: {
NIX_CFLAGS_COMPILE = builtins.toString oldAttrs.NIX_CFLAGS_COMPILE or "" + "-march=native -O3";
}
) else pkgs.emacs30-pgtk;
# By default emacsWithPackagesFromUsePackage will only pull in
# packages with `:ensure`, `:ensure t` or `:ensure <package name>`.