3
0
Fork 0
forked from mirrors/nixpkgs

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

This commit is contained in:
Peter Simons 2015-06-05 12:42:34 +02:00
parent c1c4ca08de
commit 7acb77ca2b

View file

@ -32,7 +32,7 @@ mkDerivation rec {
];
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 = ''
@ -41,7 +41,7 @@ mkDerivation rec {
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";