Skip to content

Stylix can't load properly #43

@GNUqb114514

Description

@GNUqb114514

I am trying to use neomacs with home-manager and stylix by passing programs.emacs.package = neomacs, but I ran into problem. Stylix configuration can't build with neomacs, but Emacs can.

Here's the nix log when building base16-stylix-theme.el with Emacs:

structuredAttrs is enabled
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/4gv9blcyrz9qnn5q05mhmi375zk1w57z-base16-stylix-theme.el
source root is .
setting SOURCE_DATE_EPOCH to timestamp 1771740794 of file "./.attrs.sh"
warning: file "./.attrs.sh" may be generated; SOURCE_DATE_EPOCH may be non-deterministic
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }

In toplevel form:
base16-stylix-theme.el:1:1: Warning: file has no `lexical-binding' directive on its first line
Running phase: installPhase
@nix { "action": "setPhase", "phase": "installPhase" }
sh -c 'emacs          --batch          -f package-activate-all          --eval '\''(setq native-comp-eln-load-path (cdr native-comp-eln-load-path))'\''          --eval '\''(let ((default-directory "/nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0/share/emacs/site-lisp")) (normal-top-level-add-subdirs-to-load-path))'\''          --eval '\''(setq large-file-warning-threshold nil)'\''          --eval '\''(setq byte-compile-error-on-warn nil)'\''          -f batch-native-compile /nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0/share/emacs/site-lisp/base16-stylix-theme.el        || exit $?'

In toplevel form:
/nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0/share/emacs/site-lisp/base16-stylix-theme.el:1:1: Warning: file has no `lexical-binding' directive on its first line
Running phase: fixupPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
shrinking RPATHs of ELF executables and libraries in /nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0
shrinking /nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0/share/emacs/native-lisp/30.2-8b6cdc5a/base16-stylix-theme-f88581aa-363520fd.eln
checking for references to /build/ in /nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0...
patching script interpreter paths in /nix/store/5hg5cylavmw71mrx7lbmq30ix21rrv8y-emacs-base16-stylix-theme-0.1.0

Here's the same package with neomacs:

structuredAttrs is enabled
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/c9wg9jj2f48p9zv7zsrj6m7q6vxqz3bx-base16-stylix-theme.el
source root is .
setting SOURCE_DATE_EPOCH to timestamp 1771994095 of file "./.attrs.sh"
warning: file "./.attrs.sh" may be generated; SOURCE_DATE_EPOCH may be non-deterministic
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }

In toplevel form:
base16-stylix-theme.el:1:1: Warning: file has no `lexical-binding' directive on its first line
>>Error occurred processing base16-stylix-theme.el: File is missing (("Cannot open load file" "No such file or directory" "base16-theme"))
DEBUG: kill-emacs called! arg=0x6, restart=(nil)
  Lisp backtrace:
    [0] kill-emacs
    [1] batch-byte-compile
    [2] command-line-1
    [3] command-line
    [4] normal-top-level
  End backtrace.

Here's the emacs lisp file that stylix wanted to put into my config:

(require 'base16-theme)

(defvar base16-stylix-theme-colors
  '(:base00 "#eff1f5"
    :base01 "#ccd0da"
    :base02 "#bcc0cc"
    :base03 "#9ca0b0"
    :base04 "#6c6f85"
    :base05 "#4c4f69"
    :base06 "#dc8a78"
    :base07 "#7287fd"
    :base08 "#d20f39"
    :base09 "#fe640b"
    :base0A "#df8e1d"
    :base0B "#40a02b"
    :base0C "#179299"
    :base0D "#1e66f5"
    :base0E "#8839ef"
    :base0F "#dd7878")
  "All colors for Base16 stylix are defined here.")

;; Define the theme
(deftheme base16-stylix)

;; Add all the faces to the theme
(base16-theme-define 'base16-stylix base16-stylix-theme-colors)

;; Mark the theme as provided
(provide-theme 'base16-stylix)

;; Add path to theme to theme-path
(add-to-list 'custom-theme-load-path
    (file-name-directory
        (file-truename load-file-name)))

(provide 'base16-stylix-theme)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions