cabal2nix: run "git reset --hard" to clean up the source to avoid the "-dirty" tag

Changed files
+2 -2
pkgs
development
tools
haskell
cabal2nix
+2 -2
pkgs/development/tools/haskell/cabal2nix/default.nix
···
];
buildTools = [ gitMinimal makeWrapper ];
preConfigure = ''
-
sed -i -e 's|, "--dirty"||' generate-cabal-file.hs
+
git reset --hard # Re-create the index that fetchgit destroyed in the name of predictable hashes.
runhaskell $setupCompileFlags generate-cabal-file --release >cabal2nix.cabal
'';
postInstall = ''
···
rm -rf $out/{bin,lib,share}
makeWrapper $exe $out/bin/cabal2nix --prefix PATH ":" "${nix-prefetch-scripts}/bin"
mkdir -p $out/share/bash-completion/completions
-
$exe --bash-completion-script $out/bin/cabal2nix >$out/share/bash-completion/completions/cabal2nix
+
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/cabal2nix
'';
homepage = "http://github.com/NixOS/cabal2nix/";
description = "Convert Cabal files into Nix build instructions";