Handle building from a dirty Git tree

This commit is contained in:
Eelco Dolstra 2015-06-12 18:02:39 +02:00
parent 18e0a62e24
commit f06ec78859

View file

@ -50,6 +50,13 @@ in rec {
addToSearchPath PERL5LIB $(pwd)/src/lib 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 = configureFlags =
[ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];