From f06ec788593ab94a16605b340dafbb8fdd77b4ce Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Jun 2015 18:02:39 +0200 Subject: [PATCH] Handle building from a dirty Git tree --- release.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release.nix b/release.nix index 400cb533..a0860ecf 100644 --- a/release.nix +++ b/release.nix @@ -50,6 +50,13 @@ in rec { addToSearchPath PERL5LIB $(pwd)/src/lib ''; + postUnpack = '' + # Clean up when building from a working tree. + if [ -z "$IN_NIX_SHELL" ]; then + (cd $sourceRoot && (git ls-files -o --directory | xargs -r rm -rfv)) || true + fi + ''; + configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];