Commit d7afeaa93da0

Vincent Demeester <vincent@sbr.pm>
2026-04-13 23:09:55
feat(emacs): add ghostel terminal emulator
Added ghostel package (libghostty-powered terminal) with overrides to exclude evil integration files that break byte-compilation and to bundle the pre-built native module since the Nix store is read-only at runtime.
1 parent 2c2e23e
Changed files (1)
home
common
home/common/dev/emacs.nix
@@ -78,6 +78,22 @@ let
       esup
       # flimenu
       flymake-yamllint
+      (ghostel.overrideAttrs (old: {
+        # Exclude evil integration files to avoid build failure when evil is not installed
+        preBuild = (old.preBuild or "") + ''
+          rm -f "$NIX_BUILD_TOP/working/ghostel/evil-ghostel.el" "$NIX_BUILD_TOP/working/ghostel/ghostel-evil.el" 2>/dev/null || true
+        '';
+        # Install pre-built native module (Nix store is read-only, can't download at runtime)
+        postInstall = (old.postInstall or "") + ''
+          local dest=$(find $out/share/emacs/site-lisp/elpa -maxdepth 1 -name 'ghostel-*' -type d)
+          install -m444 ${
+            pkgs.fetchurl {
+              url = "https://github.com/dakra/ghostel/releases/download/v0.13.0/ghostel-module-x86_64-linux.so";
+              hash = "sha256-C+hinkx7uKIQw04TNevVZ6ybutpqm62wqo62q2KSbUk=";
+            }
+          } $dest/ghostel-module.so
+        '';
+      }))
       git-modes
       go-mode
       gotest