summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-07-18 20:31:04 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-07-18 20:32:41 +0200
commita6c5f0a199cf387e2c97e24f4f84c6ef26c19941 (patch)
tree953ab38e53a28713775deb98045bea6711399c0b
parent898375d7b20379b7b5db28d494e209f1cf1cc937 (diff)
Add "make" overwrite so we can call it from the whole workingtree
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--shell.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
index 83ba552..08c8134 100644
--- a/shell.nix
+++ b/shell.nix
@@ -8,10 +8,17 @@ let
sleep 3
done
'');
+
+ shellMake = pkgs.writeScriptBin "make" ''
+ rootdir="$(${pkgs.git}/bin/git rev-parse --show-toplevel)"
+ [[ -z "$rootdir" ]] && { echo "Not in a git repo"; exit 1; }
+ ${pkgs.gnumake}/bin/make -C "$rootdir" $*
+ '';
in
pkgs.mkShell {
buildInputs = with pkgs; [
watchscript
+ shellMake
zola
];
}