diff --git a/pkgs/by-name/om/om4/include-exit.patch b/pkgs/by-name/om/om4/include-exit.patch new file mode 100644 index 000000000000..8b5e2f9b4f54 --- /dev/null +++ b/pkgs/by-name/om/om4/include-exit.patch @@ -0,0 +1,14 @@ +Index: a/parser.y +=================================================================== +--- a/parser.y ++++ a/parser.y +@@ -16,8 +16,9 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + #include + #include ++#include + #define YYSTYPE int32_t + extern int32_t end_result; + extern int yylex(void); + extern int yyerror(const char *); diff --git a/pkgs/by-name/om/om4/package.nix b/pkgs/by-name/om/om4/package.nix index 078bc8510a4a..1efc9047ec26 100644 --- a/pkgs/by-name/om/om4/package.nix +++ b/pkgs/by-name/om/om4/package.nix @@ -13,10 +13,15 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "ibara"; repo = "m4"; - rev = "${pname}-${version}"; - sha256 = "04h76hxwb5rs3ylkw1dv8k0kmkzl84ccqlwdwxb6i0x57rrqbgzx"; + tag = "om4-${version}"; + hash = "sha256-/b+Fcz6lg2hW541TzBhB9M86wUS7BT6pHzqXxTs0BxI="; }; + patches = [ + # parser.y:51:25: error: implicit declaration of function 'exit' [] + ./include-exit.patch + ]; + strictDeps = true; nativeBuildInputs = [ bison @@ -25,17 +30,17 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-m4" ]; - meta = with lib; { + meta = { description = "Portable OpenBSD m4 macro processor"; homepage = "https://github.com/ibara/m4"; - license = with licenses; [ + license = with lib.licenses; [ bsd2 bsd3 isc publicDomain ]; mainProgram = "m4"; - platforms = platforms.unix; + platforms = lib.platforms.unix; maintainers = [ ]; }; }