aspell: fix build with gcc-7 via upstream patch

This commit is contained in:
Vladimír Čunát 2017-11-12 11:15:07 +01:00
parent 185cd2c60c
commit f52bafe8e1
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -1,5 +1,6 @@
{stdenv, fetchurl, perl
, searchNixProfiles ? true}:
{ stdenv, fetchurl, fetchpatch, perl
, searchNixProfiles ? true
}:
stdenv.mkDerivation rec {
name = "aspell-0.60.6.1";
@ -9,10 +10,16 @@ stdenv.mkDerivation rec {
sha256 = "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm";
};
patchPhase = ''
patches = [
(fetchpatch { # remove in >= 0.60.7
name = "gcc-7.patch";
url = "https://github.com/GNUAspell/aspell/commit/8089fa02122fed0a.diff";
sha256 = "1b3p1zy2lqr2fknddckm58hyk95hw4scf6hzjny1v9iaic2p37ix";
})
] ++ stdenv.lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
postPatch = ''
patch interfaces/cc/aspell.h < ${./clang.patch}
'' + stdenv.lib.optionalString searchNixProfiles ''
patch -p1 < ${./data-dirs-from-nix-profiles.patch}
'';
buildInputs = [ perl ];