From 259379d20d979aff1726d01afcf602a75151bf05 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Fri, 19 Apr 2024 20:53:51 +0100 Subject: [PATCH] Include the wm module on the default package as well --- nix/fg42/derivation.nix | 31 +++++++++++++++++++++++-------- nix/fg42/utils.nix | 1 - nix/modules/default.nix | 1 + nix/version.nix | 2 +- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/nix/fg42/derivation.nix b/nix/fg42/derivation.nix index e81e50e..324db85 100644 --- a/nix/fg42/derivation.nix +++ b/nix/fg42/derivation.nix @@ -32,6 +32,9 @@ with builtins; let + src = ../../.; + pname = "FG42"; + cfg = config.fg42; emacs = cfg.emacs; version = cfg.version; @@ -62,14 +65,15 @@ let in stdenv.mkDerivation rec { - inherit version; - pname = builtins.trace ">>> ${configFile}" "FG42"; + inherit version src pname; - src = ../../.; buildPhase = '' runHook preBuild + # ============================= + # Building FG42 itself + # ============================= LISPDIR=$out/share/fg42/ 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 -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} + cd $LISPDIR + #compile stuff + cd - + # ============================= + # Creating the desktop file + # ============================= cat >> $out/share/applications/FG42.desktop << EOF [Desktop Entry] Encoding=UTF-8 @@ -109,15 +119,19 @@ stdenv.mkDerivation rec { Version=${version} EOF + # ============================= + # Adding the runtime deps to + # runtime closure + # ============================= cat >> $out/share/runtime_deps << EOF ${lib.strings.concatLines runtimeDependencies} ${emacsBundle} EOF - cd $LISPDIR - #compile stuff - cd - + # ============================= + # Creating fg42 command + # ============================= cat >> $out/bin/fg42 << EOF #!${stdenv.shell} @@ -138,8 +152,10 @@ stdenv.mkDerivation rec { mkdir -p $LISPDIR #emacs --batch -l package --eval "(package-generate-autoloads \"${pname}\" \"$LISPDIR\")" - runHook postBuild + # ============================= + # Creating the fg42-wm command + # ============================= cat >> $out/bin/fg42-wm << EOF #!${stdenv.shell} @@ -173,7 +189,6 @@ stdenv.mkDerivation rec { EOF chmod +x $out/bin/fg42-wm - runHook postBuild ''; diff --git a/nix/fg42/utils.nix b/nix/fg42/utils.nix index b38b19a..65cd108 100644 --- a/nix/fg42/utils.nix +++ b/nix/fg42/utils.nix @@ -34,5 +34,4 @@ ''; }); - } diff --git a/nix/modules/default.nix b/nix/modules/default.nix index 85f8a8a..36e30e9 100644 --- a/nix/modules/default.nix +++ b/nix/modules/default.nix @@ -33,6 +33,7 @@ let ./nix ./c-family ./python + ./wm ]; in modules diff --git a/nix/version.nix b/nix/version.nix index cfdca15..f83f95e 100644 --- a/nix/version.nix +++ b/nix/version.nix @@ -17,4 +17,4 @@ # This is the home manager module that exposes FG42. It differs # from FG42 modules that are structurally the same but used in # different context -_: "4.0.0" +_: "4.1.0"