From 2e2f5fffe675dfd797f20b4d1317fa401ac82398 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 5 Dec 2024 19:40:41 +0100 Subject: [PATCH] Keep `.git` directory of `nixpkgs` --- scripts/lib/nix.fish | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/lib/nix.fish b/scripts/lib/nix.fish index 670c8f89..36e795e0 100644 --- a/scripts/lib/nix.fish +++ b/scripts/lib/nix.fish @@ -17,7 +17,6 @@ begin and git -C "$nixPkgsCache" remote add origin https://github.com/NixOS/nixpkgs.git and git -C "$nixPkgsCache" fetch --depth=1 origin "$nixPkgsVersion" and git -C "$nixPkgsCache" reset --hard FETCH_HEAD - and rm -rf "$nixPkgsCache/.git" end end @@ -29,8 +28,8 @@ begin downloadNixPkgs end - sudo mkdir -p "$nixPkgsDir" - sudo cp -r "$nixPkgsCache"/* "$nixPkgsDir" + sudo rm -rf "$nixPkgsDir" + sudo cp -r "$nixPkgsCache" "$nixPkgsDir" end end