haskell-generic-builder: when replacing an edited Cabal file, show the download URL rather than the store path
This commit is contained in:
parent
1afa8d28ea
commit
943bc26762
1 changed files with 3 additions and 2 deletions
|
@ -55,8 +55,9 @@ let
|
||||||
|
|
||||||
isGhcjs = ghc.isGhcjs or false;
|
isGhcjs = ghc.isGhcjs or false;
|
||||||
|
|
||||||
|
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
|
||||||
newCabalFile = fetchurl {
|
newCabalFile = fetchurl {
|
||||||
url = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
|
url = newCabalFileUrl;
|
||||||
sha256 = editedCabalFile;
|
sha256 = editedCabalFile;
|
||||||
name = "${pname}-${version}-r${revision}.cabal";
|
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.
|
LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase.
|
||||||
|
|
||||||
prePatch = optionalString (editedCabalFile != null) ''
|
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
|
cp ${newCabalFile} ${pname}.cabal
|
||||||
'' + optionalString jailbreak ''
|
'' + optionalString jailbreak ''
|
||||||
echo "Running jailbreak-cabal to lift version restrictions on build inputs."
|
echo "Running jailbreak-cabal to lift version restrictions on build inputs."
|
||||||
|
|
Loading…
Reference in a new issue