From 7acb77ca2bfd54578ad4a37c05666ea5da967457 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 5 Jun 2015 12:42:34 +0200 Subject: [PATCH] cabal2nix: run "git reset --hard" to clean up the source to avoid the "-dirty" tag --- pkgs/development/tools/haskell/cabal2nix/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix index 240353b6e75..3da457bdf76 100644 --- a/pkgs/development/tools/haskell/cabal2nix/default.nix +++ b/pkgs/development/tools/haskell/cabal2nix/default.nix @@ -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";