cabal2nix: get rid of the '-dirty' version suffix

The fetchgit builder performs some freak magic in the name of deterministic
hashes that screws up git's idea of a clean directory tree.
This commit is contained in:
Peter Simons 2015-06-04 13:33:57 +02:00
parent ac5d849ff6
commit c659105ef8

View File

@ -31,7 +31,10 @@ mkDerivation rec {
split transformers utf8-string split transformers utf8-string
]; ];
buildTools = [ gitMinimal makeWrapper ]; buildTools = [ gitMinimal makeWrapper ];
preConfigure = "runhaskell $setupCompileFlags generate-cabal-file --release >cabal2nix.cabal"; preConfigure = ''
sed -i -e 's|, "--dirty"||' generate-cabal-file.hs
runhaskell $setupCompileFlags generate-cabal-file --release >cabal2nix.cabal
'';
postInstall = '' postInstall = ''
exe=$out/libexec/${pname}-${version}/cabal2nix exe=$out/libexec/${pname}-${version}/cabal2nix
install -D $out/bin/cabal2nix $exe install -D $out/bin/cabal2nix $exe