about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-18T21·10+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-18T21·10+0100
commit2e0322efd14df7a1658201fb443c8e90687dcfda (patch)
treee49817155424db77734326999c94585be7838f37 /release.nix
parentbd50c01972718167cf86d20dcd9c928b4c3cfbd8 (diff)
Clean up when building from a working tree
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/release.nix b/release.nix
index c1173c30f3..953211f0e9 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}