From 164487a5ba568fa344fae9f4b9515b351da430b6 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 15 Oct 2015 11:42:13 -0700 Subject: [PATCH 1/2] Simplify source tarball postUnpack cleanupx --- release.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.nix b/release.nix index 5a5a1226f..dd5f1c4d3 100644 --- a/release.nix +++ b/release.nix @@ -36,7 +36,7 @@ let postUnpack = '' # Clean up when building from a working tree. - (cd $sourceRoot && (git ls-files -o | xargs -r rm -v)) + git -C $sourceRoot clean -fd ''; preConfigure = '' From a7dd26961db0a08ff628ed1e72048c65128b9ca1 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 15 Oct 2015 11:29:38 -0700 Subject: [PATCH 2/2] Don't depend on git when generating source tarball --- local.mk | 3 ++- release.nix | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/local.mk b/local.mk index 160057ad2..2541f3f32 100644 --- a/local.mk +++ b/local.mk @@ -1,5 +1,6 @@ ifeq ($(MAKECMDGOALS), dist) - dist-files += $(shell git ls-files) + # Make sure we are in repo root with `--git-dir` + dist-files += $(shell git --git-dir=.git ls-files || find * -type f) endif dist-files += configure config.h.in nix.spec diff --git a/release.nix b/release.nix index dd5f1c4d3..4459bf165 100644 --- a/release.nix +++ b/release.nix @@ -36,7 +36,9 @@ let postUnpack = '' # Clean up when building from a working tree. - git -C $sourceRoot clean -fd + if [[ -d $sourceRoot/.git ]]; then + git -C $sourceRoot clean -fd + fi ''; preConfigure = ''