From 3a0c2ef6497da0283d0369642c2dced93a73c0be 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: [PATCH] aspellDicts.is, aspellDicts.nb: fix build on darwin --- .../libraries/aspell/dictionaries.nix | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/development/libraries/aspell/dictionaries.nix b/pkgs/development/libraries/aspell/dictionaries.nix index c0d9d87aa4223..74caec57c2d83 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;