about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--release.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/release.nix b/release.nix
index c1173c30f369..953211f0e989 100644
--- a/release.nix
+++ b/release.nix
@@ -20,7 +20,7 @@ let
 
         buildInputs =
           [ curl bison24 flex2535 perl libxml2 libxslt w3m bzip2
-            tetex dblatex nukeReferences pkgconfig
+            tetex dblatex nukeReferences pkgconfig git
           ];
 
         configureFlags = ''
@@ -31,6 +31,11 @@ let
           --with-dbd-sqlite=${perlPackages.DBDSQLite}/lib/perl5/site_perl
         '';
 
+        postUnpack = ''
+          # Clean up when building from a working tree.
+          (cd $sourceRoot && (git ls-files -o | xargs rm -v))
+        '';
+
         # Include the Bzip2 tarball in the distribution.
         preConfigure = ''
           stripHash ${bzip2.src}