om4: fix build on GCC 14

+24 -5
+14
pkgs/by-name/om/om4/include-exit.patch
··· 1 + Index: a/parser.y 2 + =================================================================== 3 + --- a/parser.y 4 + +++ a/parser.y 5 + @@ -16,8 +16,9 @@ 6 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 7 + */ 8 + #include <math.h> 9 + #include <stdint.h> 10 + +#include <stdlib.h> 11 + #define YYSTYPE int32_t 12 + extern int32_t end_result; 13 + extern int yylex(void); 14 + extern int yyerror(const char *);
+10 -5
pkgs/by-name/om/om4/package.nix
··· 13 13 src = fetchFromGitHub { 14 14 owner = "ibara"; 15 15 repo = "m4"; 16 - rev = "${pname}-${version}"; 17 - sha256 = "04h76hxwb5rs3ylkw1dv8k0kmkzl84ccqlwdwxb6i0x57rrqbgzx"; 16 + tag = "om4-${version}"; 17 + hash = "sha256-/b+Fcz6lg2hW541TzBhB9M86wUS7BT6pHzqXxTs0BxI="; 18 18 }; 19 19 20 + patches = [ 21 + # parser.y:51:25: error: implicit declaration of function 'exit' [] 22 + ./include-exit.patch 23 + ]; 24 + 20 25 strictDeps = true; 21 26 nativeBuildInputs = [ 22 27 bison ··· 25 30 26 31 configureFlags = [ "--enable-m4" ]; 27 32 28 - meta = with lib; { 33 + meta = { 29 34 description = "Portable OpenBSD m4 macro processor"; 30 35 homepage = "https://github.com/ibara/m4"; 31 - license = with licenses; [ 36 + license = with lib.licenses; [ 32 37 bsd2 33 38 bsd3 34 39 isc 35 40 publicDomain 36 41 ]; 37 42 mainProgram = "m4"; 38 - platforms = platforms.unix; 43 + platforms = lib.platforms.unix; 39 44 maintainers = [ ]; 40 45 }; 41 46 }