From 943bc26762793b21e0c84ee523c1f5fe23bb624d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 1 Apr 2015 13:52:21 +0200 Subject: [PATCH] haskell-generic-builder: when replacing an edited Cabal file, show the download URL rather than the store path --- pkgs/development/haskell-modules/generic-builder.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 30109b9a249..dfc7efe811b 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -55,8 +55,9 @@ let isGhcjs = ghc.isGhcjs or false; + newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal"; newCabalFile = fetchurl { - url = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal"; + url = newCabalFileUrl; sha256 = editedCabalFile; name = "${pname}-${version}-r${revision}.cabal"; }; @@ -134,7 +135,7 @@ stdenv.mkDerivation ({ LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase. prePatch = optionalString (editedCabalFile != null) '' - echo "Replacing Cabal file with edited version ${newCabalFile}." + echo "Replace Cabal file with edited version from ${newCabalFileUrl}." cp ${newCabalFile} ${pname}.cabal '' + optionalString jailbreak '' echo "Running jailbreak-cabal to lift version restrictions on build inputs."