openrussian-cli: unbreak on darwin

We got hit with a bad case of https://github.com/dumblob/mysql2sqlite/issues/75

+17 -1
+4 -1
pkgs/by-name/op/openrussian-cli/package.nix
··· 5 5 , pkg-config 6 6 , wget 7 7 , unzip 8 + , mawk 8 9 , sqlite 9 10 , which 10 11 , lua5_3 ··· 30 31 url = "https://github.com/rhaberkorn/openrussian-cli/commit/984e555acbadbd1aed7df17ab53e2c586a2f8f68.patch"; 31 32 hash = "sha256-/z4YrEeuejtCtwiFXksFREwgQoWvtI0Kl9w75KDQfF8="; 32 33 }) 34 + # Work around https://github.com/dumblob/mysql2sqlite/issues/75 35 + ./use-mawk.patch 33 36 ]; 34 37 35 38 nativeBuildInputs = [ ··· 40 43 which 41 44 installShellFiles 42 45 makeWrapper 46 + mawk 43 47 ]; 44 48 45 49 buildInputs = [ luaEnv ]; ··· 77 81 license = with licenses; [ gpl3Only mit cc-by-sa-40 ]; 78 82 maintainers = with maintainers; [ zane ]; 79 83 mainProgram = "openrussian"; 80 - broken = stdenv.isDarwin; # FIXME: The mysql2sqlite script hangs on Darwin. 81 84 platforms = platforms.unix; 82 85 }; 83 86 }
+13
pkgs/by-name/op/openrussian-cli/use-mawk.patch
··· 1 + diff --git a/Makefile b/Makefile 2 + index 8fe3880..281ce2d 100644 3 + --- a/Makefile 4 + +++ b/Makefile 5 + @@ -25,7 +25,7 @@ openrussian-sql.zip: 6 + 7 + openrussian-sqlite3.db : openrussian-sql.zip mysql2sqlite postprocess.sql 8 + $(RM) $@ 9 + - unzip -p $< openrussian.sql | awk -f ./mysql2sqlite - | sqlite3 $@ 10 + + unzip -p $< openrussian.sql | mawk -f ./mysql2sqlite - | sqlite3 $@ 11 + sqlite3 $@ -batch <postprocess.sql 12 + 13 + # Try to generate all possible pages