diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix b/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix index c0d9d87aa422..ea8a2133c82b 100644 --- a/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix +++ b/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix @@ -1,7 +1,5 @@ {lib, stdenv, fetchurl, aspell, which, writeScript}: -with lib; - /* HOWTO: * Add some of these to your profile or systemPackages. @@ -105,6 +103,26 @@ let homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html"; } // (args.meta or {}); + } // lib.optionalAttrs (stdenv.isDarwin && lib.elem language [ "is" "nb" ]) { + # tar: Cannot open: Illegal byte sequence + unpackPhase = '' + runHook preUnpack + + tar -xf $src --strip-components=1 || true + + runHook postUnpack + ''; + + postPatch = lib.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; @@ -117,7 +135,7 @@ let preBuild = '' # Aspell can't handle multiple data-dirs # Copy everything we might possibly need - ${concatMapStringsSep "\n" (p: '' + ${lib.concatMapStringsSep "\n" (p: '' cp -a ${p}/lib/aspell/* . '') ([ aspell ] ++ langInputs)} export ASPELL_CONF="data-dir $(pwd)" |