Make sure WM mode is reachable

This commit is contained in:
Sameer Rahmani 2024-02-22 14:19:57 +00:00
parent d2713dab39
commit 688c76af87
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
5 changed files with 104 additions and 94 deletions

View File

@ -50,6 +50,9 @@
(when (file-exists-p user-init-file)
(require 'fg42/cube)
(require 'fg42/flags)
(require 'fg42/cubes/fg42)
(load user-init-file))
(add-hook 'emacs-startup-hook

View File

@ -144,6 +144,7 @@ contextual information."
:flag-default t
(fpkg/use exec-path-from-shell
:init
(require 'exec-path-from-shell)
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))))

View File

@ -116,6 +116,7 @@
mini-modeline
smart-mode-line
all-the-icons
exwm
)
(provide 'fg42/deps)

View File

@ -167,7 +167,7 @@ last item in second form, etc."
"A wrapper for autloading FN at FILE with the given DOCSTRING.
This macro looks inside of the cubes directories. If the INTERACTIVE param
is non-nil value it means that the function can be called interactively."
`(autoload ,fn (expand-file-name (format "core/fg42/cubes/%s" ,file) fg42-home)
`(autoload ,fn (expand-file-name (format "lisp/fg42/cubes/%s" ,file) fg42-home)
,docstring ,interactive))

View File

@ -37,8 +37,6 @@
bash,
}:
with builtins;
stdenv.mkDerivation (final:
let
getPkg = epkgs: pkg:
if hasAttr pkg epkgs
@ -50,9 +48,8 @@ stdenv.mkDerivation (final:
);
maintainers = import ./maintainers.nix;
in rec{
pname = "fg42";
in stdenv.mkDerivation (final: rec{
pname = "fg42$";
version = "4.0.0";
src = srcDir;
@ -79,12 +76,13 @@ stdenv.mkDerivation (final:
export FG42_USE_NIX=true;
LIBRARY_PATH="\$(${stdenv.cc}/bin/cc -print-file-name=libgccjit.so):\$LIBRARY_PATH" \
FG42_WM=false ${emacsBundle}/bin/emacs \
FG42_WM=fales ${emacsBundle}/bin/emacs \
--name FG42 \
-q --no-splash --title FG42 \
-l \$FG42_HOME/lisp/fg42/init.el "\$@"
EOF
chmod +x $out/bin/fg42
runHook postBuild
cat >> $out/bin/fg42-wm << EOF
#!${stdenv.shell}
@ -92,6 +90,7 @@ stdenv.mkDerivation (final:
export FG42_HOME=${placeholder "out"}/share/fg42/
export FG42_EMACSD=~/.fg42/v4/emacs.d
export FG42_USE_NIX=true;
# Disable access control for the current user.
xhost +SI:localuser:$USER
@ -118,8 +117,16 @@ stdenv.mkDerivation (final:
EOF
chmod +x $out/bin/fg42-wm
runHook postBuild
cat >> $out/share/runtiem_deps << EOF
${vazir-fonts}
${fira-code}
${nerdfonts}
${ripgrep}
${git}
${ltex-ls}
EOF
runHook postBuild
'';
installPhase = ''
@ -133,7 +140,6 @@ stdenv.mkDerivation (final:
buildInputs = [
gcc
emacs
texinfo
emacsBundle
@ -148,7 +154,6 @@ stdenv.mkDerivation (final:
bash
];
addEmacsNativeLoadPath = true;
meta = {