From 2d1dc67fe1d2abbd86051c59eaa597ef85c09129 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 4 Nov 2022 01:11:32 +0100 Subject: aspellDicts.is, aspellDicts.nb: fix build on darwin --- pkgs/development/libraries/aspell/dictionaries.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'pkgs/development/libraries/aspell') diff --git a/pkgs/development/libraries/aspell/dictionaries.nix b/pkgs/development/libraries/aspell/dictionaries.nix index c0d9d87aa42..74caec57c2d 100644 --- a/pkgs/development/libraries/aspell/dictionaries.nix +++ b/pkgs/development/libraries/aspell/dictionaries.nix @@ -105,6 +105,26 @@ let homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html"; } // (args.meta or {}); + } // lib.optionalAttrs (stdenv.isDarwin && elem language [ "is" "nb" ]) { + # tar: Cannot open: Illegal byte sequence + unpackPhase = '' + runHook preUnpack + + tar -xf $src --strip-components=1 || true + + runHook postUnpack + ''; + + postPatch = getAttr language { + is = '' + cp icelandic.alias íslenska.alias + sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre + ''; + nb = '' + cp bokmal.alias bokmål.alias + sed -i 's/ bokm.l\.alias/ bokmål.alias/g' Makefile.pre + ''; + }; } // removeAttrs args [ "language" "filename" "sha256" "meta" ]; in buildDict buildArgs; -- cgit 1.4.1