From 9f249ae72f91ebf1ee2f52c52a0326aa901c8c5d Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Mon, 3 Jun 2024 22:18:00 +1000 Subject: [PATCH] Push noProfileHack handling to bash Gets rid of the last string substitution. --- default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 9d71dd2..883eb8c 100644 --- a/default.nix +++ b/default.nix @@ -307,7 +307,7 @@ let # Force local build in case the user init.el does something weird. doomProfile = runCommandLocal "doom-profile" { - inherit doomDir doomIntermediates doomSource profileName runtimeShell; + inherit doomDir doomIntermediates doomSource noProfileHack profileName runtimeShell; buildProfileLoader = ./build-helpers/build-profile-loader; buildProfile = ./build-helpers/build-profile; initEl = ./init.el; @@ -342,7 +342,7 @@ let if [[ -n "$profileName" ]]; then export DOOMPROFILELOADFILE=$out/loader/init.el $runtimeShell $doomSource/bin/doomscript $buildProfileLoader \ - -n "$profileName" -b "$out" ${optionalString noProfileHack "-u"} + ''${noProfileHack:+-u} -n "$profileName" -b "$out" # With DOOMPROFILE set, doom-state-dir and friends are HOME-relative. export HOME=$(mktemp -d)