Skip to content

Commit

Permalink
mecab: add libiconv as buildInputs
Browse files Browse the repository at this point in the history
 NixOS#257480 added utf8 support but mecab depends on libiconv to convert between
charsets. Thus, on MacOS it doesn't works
  • Loading branch information
xuanduc987 committed Oct 24, 2023
1 parent 8efd5d1 commit 725d620
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion pkgs/tools/text/mecab/base.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl }:
{ fetchurl, libiconv }:

finalAttrs: {
version = "0.996";
Expand All @@ -9,6 +9,8 @@ finalAttrs: {
hash = "sha256-4HMyV4MTW3LmZhRceBu0j62lg9UiT7JJD7bBQDumnFk=";
};

buildInputs = [ libiconv ];

configureFlags = [
"--with-charset=utf8"
];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/text/mecab/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl, mecab-ipadic }:
{ lib, stdenv, fetchurl, mecab-ipadic, libiconv }:

let
mecab-base = import ./base.nix { inherit fetchurl; };
mecab-base = import ./base.nix { inherit fetchurl libiconv; };
in
stdenv.mkDerivation (finalAttrs: ((mecab-base finalAttrs) // {
pname = "mecab";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/text/mecab/nodic.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, libiconv }:

let
mecab-base = import ./base.nix { inherit fetchurl; };
mecab-base = import ./base.nix { inherit fetchurl libiconv; };
in
stdenv.mkDerivation (finalAttrs: ((mecab-base finalAttrs) // {
pname = "mecab-nodic";
Expand Down

0 comments on commit 725d620

Please sign in to comment.