diff --git a/pkgs/by-name/jb/jbofihe/fix-gcc14-errors.patch b/pkgs/by-name/jb/jbofihe/fix-gcc14-errors.patch new file mode 100644 index 000000000000..0c95bf305c84 --- /dev/null +++ b/pkgs/by-name/jb/jbofihe/fix-gcc14-errors.patch @@ -0,0 +1,37 @@ +diff --git a/add_trace_to_tabc.pl b/add_trace_to_tabc.pl +index 04be787..3186075 100644 +--- a/add_trace_to_tabc.pl ++++ b/add_trace_to_tabc.pl +@@ -15,11 +15,11 @@ + # COPYRIGHT + + print <) { +diff --git a/dfasyn/n2d.h b/dfasyn/n2d.h +index b2159ba..6c56abb 100644 +--- a/dfasyn/n2d.h ++++ b/dfasyn/n2d.h +@@ -181,6 +181,10 @@ Expr * new_xor_expr(Expr *c1, Expr *c2); + Expr * new_cond_expr(Expr *c1, Expr *c2, Expr *c3); + Expr * new_sym_expr(char *sym_name); + ++int yyparse(void); ++void yyerror(char *); ++int yylex(void); ++ + void define_symbol(Evaluator *x, char *name, Expr *e); + void define_result(Evaluator *x, char *string, Expr *e, int early); + void define_symresult(Evaluator *x, char *string, Expr *e, int early); + diff --git a/pkgs/by-name/jb/jbofihe/package.nix b/pkgs/by-name/jb/jbofihe/package.nix index 199ee632c19c..8bd66a04af6d 100644 --- a/pkgs/by-name/jb/jbofihe/package.nix +++ b/pkgs/by-name/jb/jbofihe/package.nix @@ -7,17 +7,23 @@ perl, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "jbofihe"; version = "0.43"; src = fetchFromGitHub { owner = "lojban"; repo = "jbofihe"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "1xx7x1256sjncyzx656jl6jl546vn8zz0siymqalz6v9yf341p98"; }; + patches = [ + # fix build with gcc14: + # https://github.com/lojban/jbofihe/pull/19 + ./fix-gcc14-errors.patch + ]; + nativeBuildInputs = [ bison flex @@ -31,10 +37,10 @@ stdenv.mkDerivation rec { runHook postCheck ''; - meta = with lib; { + meta = { description = "Parser & analyser for Lojban"; homepage = "https://github.com/lojban/jbofihe"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ chkno ]; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ chkno ]; }; -} +})