Merge pull request #231538 from trofi/imagelol-zhf

imagelol: fix build on gcc-12

authored by

Martin Weinelt and committed by
GitHub
a56d8699 b873bb9a

+20 -1
+20 -1
pkgs/tools/compression/imagelol/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake }: 2 3 stdenv.mkDerivation rec { 4 pname = "imagelol"; ··· 11 sha256 = "0978zdrfj41jsqm78afyyd1l64iki9nwjvhd8ynii1b553nn4dmd"; 12 fetchSubmodules = true; 13 }; 14 15 # fix for case-sensitive filesystems 16 # https://github.com/MCredstoner2004/ImageLOL/issues/1
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , cmake 6 + }: 7 8 stdenv.mkDerivation rec { 9 pname = "imagelol"; ··· 16 sha256 = "0978zdrfj41jsqm78afyyd1l64iki9nwjvhd8ynii1b553nn4dmd"; 17 fetchSubmodules = true; 18 }; 19 + 20 + patches = [ 21 + # upstream gcc-12 compatibility fix 22 + (fetchpatch { 23 + name = "gcc-12.patch"; 24 + url = "https://github.com/MCredstoner2004/ImageLOL/commit/013fb1f901d88f5fd21a896bfab47c7fff0737d7.patch"; 25 + hash = "sha256-RVaG2xbUqE4CxqI2lhvug2qihT6A8vN+pIfK58CXLDw="; 26 + includes = [ "imagelol/ImageLOL.inl" ]; 27 + # change lib/ for imagelol 28 + stripLen = 2; 29 + extraPrefix = "imagelol/"; 30 + }) 31 + ]; 32 + 33 34 # fix for case-sensitive filesystems 35 # https://github.com/MCredstoner2004/ImageLOL/issues/1