From a6c5f0a199cf387e2c97e24f4f84c6ef26c19941 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 18 Jul 2021 20:31:04 +0200 Subject: Add "make" overwrite so we can call it from the whole workingtree Signed-off-by: Matthias Beyer --- shell.nix | 7 +++++++ 1 file changed, 7 insertions(+) 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 ]; } -- cgit v1.2.3