Include the wm module on the default package as well

This commit is contained in:
Sameer Rahmani 2024-04-19 20:53:51 +01:00
parent 06635d9d8b
commit 259379d20d
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
4 changed files with 25 additions and 10 deletions

View File

@ -32,6 +32,9 @@
with builtins; with builtins;
let let
src = ../../.;
pname = "FG42";
cfg = config.fg42; cfg = config.fg42;
emacs = cfg.emacs; emacs = cfg.emacs;
version = cfg.version; version = cfg.version;
@ -62,14 +65,15 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
inherit version; inherit version src pname;
pname = builtins.trace ">>> ${configFile}" "FG42";
src = ../../.;
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
# =============================
# Building FG42 itself
# =============================
LISPDIR=$out/share/fg42/ LISPDIR=$out/share/fg42/
STARTUP_FILE=$LISPDIR/lisp/fg42_init.el STARTUP_FILE=$LISPDIR/lisp/fg42_init.el
@ -92,7 +96,13 @@ stdenv.mkDerivation rec {
emacs --batch -l $LISPDIR/lisp/build.el $LISPDIR/config.json $STARTUP_FILE emacs --batch -l $LISPDIR/lisp/build.el $LISPDIR/config.json $STARTUP_FILE
#emacs -Q --batch -l package --eval "(package-generate-autoloads \"fg42_init" \"$LISPDIR\")" #emacs -Q --batch -l package --eval "(package-generate-autoloads \"fg42_init" \"$LISPDIR\")"
emacs --batch -l loaddefs-gen -f loaddefs-generate-batch $LISPDIR/lisp/ $LISPDIR/lisp/ ${emacsBundle} emacs --batch -l loaddefs-gen -f loaddefs-generate-batch $LISPDIR/lisp/ $LISPDIR/lisp/ ${emacsBundle}
cd $LISPDIR
#compile stuff
cd -
# =============================
# Creating the desktop file
# =============================
cat >> $out/share/applications/FG42.desktop << EOF cat >> $out/share/applications/FG42.desktop << EOF
[Desktop Entry] [Desktop Entry]
Encoding=UTF-8 Encoding=UTF-8
@ -109,15 +119,19 @@ stdenv.mkDerivation rec {
Version=${version} Version=${version}
EOF EOF
# =============================
# Adding the runtime deps to
# runtime closure
# =============================
cat >> $out/share/runtime_deps << EOF cat >> $out/share/runtime_deps << EOF
${lib.strings.concatLines runtimeDependencies} ${lib.strings.concatLines runtimeDependencies}
${emacsBundle} ${emacsBundle}
EOF EOF
cd $LISPDIR
#compile stuff
cd -
# =============================
# Creating fg42 command
# =============================
cat >> $out/bin/fg42 << EOF cat >> $out/bin/fg42 << EOF
#!${stdenv.shell} #!${stdenv.shell}
@ -138,8 +152,10 @@ stdenv.mkDerivation rec {
mkdir -p $LISPDIR mkdir -p $LISPDIR
#emacs --batch -l package --eval "(package-generate-autoloads \"${pname}\" \"$LISPDIR\")" #emacs --batch -l package --eval "(package-generate-autoloads \"${pname}\" \"$LISPDIR\")"
runHook postBuild
# =============================
# Creating the fg42-wm command
# =============================
cat >> $out/bin/fg42-wm << EOF cat >> $out/bin/fg42-wm << EOF
#!${stdenv.shell} #!${stdenv.shell}
@ -173,7 +189,6 @@ stdenv.mkDerivation rec {
EOF EOF
chmod +x $out/bin/fg42-wm chmod +x $out/bin/fg42-wm
runHook postBuild runHook postBuild
''; '';

View File

@ -34,5 +34,4 @@
''; '';
}); });
} }

View File

@ -33,6 +33,7 @@ let
./nix ./nix
./c-family ./c-family
./python ./python
./wm
]; ];
in in
modules modules

View File

@ -17,4 +17,4 @@
# This is the home manager module that exposes FG42. It differs # This is the home manager module that exposes FG42. It differs
# from FG42 modules that are structurally the same but used in # from FG42 modules that are structurally the same but used in
# different context # different context
_: "4.0.0" _: "4.1.0"