From 41bbdb576f024fbca84b5f9ae0154ba07f6beb0b Mon Sep 17 00:00:00 2001 From: AwesomeQubic Date: Tue, 26 Dec 2023 00:36:08 +0100 Subject: [PATCH] make functions no longer require to be ran in root --- flake.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 3b68b55675..32d438c155 100644 --- a/flake.nix +++ b/flake.nix @@ -91,15 +91,24 @@ shellHook = '' + export ROOT=$PWD + firstBuild() { - $configurePhase - $buildPhase - wrapQtApp Drawpile-build/bin/drawpile + cmake -S $ROOT -B $ROOT/Drawpile-build \ + --preset ${preset} \ + -DCMAKE_INSTALL_PREFIX=$out + cmake --build $ROOT/Drawpile-build + wrapQtApp $ROOT/Drawpile-build/bin/drawpile } incrementalBuild() { - $buildPhase - wrapQtApp Drawpile-build/bin/drawpile + cmake --build $ROOT/Drawpile-build + wrapQtApp $ROOT/Drawpile-build/bin/drawpile + } + + incrementalRun() { + incrementalBuild + $ROOT/Drawpile-build/bin/drawpile } '';