haskell.lib.buildFromSdist: Allow overrideCabal [Fixes #45018]

This commit is contained in:
Will Fancher 2018-10-19 04:49:56 -04:00
parent bd4b8a4c82
commit bc56701020
1 changed files with 7 additions and 6 deletions

View File

@ -245,12 +245,13 @@ rec {
on hackage. This can be used as a test for the source distribution,
assuming the build fails when packaging mistakes are in the cabal file.
*/
buildFromSdist = pkg: lib.overrideDerivation pkg (drv: {
unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
echo "Source tarball is at ${src}/${tarname}.tar.gz"
tar xf ${src}/${tarname}.tar.gz
cd ${pkg.pname}-*
'';
buildFromSdist = pkg: overrideCabal pkg (drv: {
src = "${sdistTarball pkg}/${pkg.pname}-${pkg.version}.tar.gz";
# Revising and jailbreaking the cabal file has been handled in sdistTarball
revision = null;
editedCabalFile = null;
jailbreak = false;
});
/* Build the package in a strict way to uncover potential problems.