summary refs log tree commit diff
path: root/pkgs/development/libraries/aspell
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2022-11-04 01:11:32 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2022-11-07 15:07:24 +0100
commit2d1dc67fe1d2abbd86051c59eaa597ef85c09129 (patch)
treeb0e2ea985f392580948ab56be97fc22496f2d746 /pkgs/development/libraries/aspell
parent58227c4de0effcc9ff72c085ba9030970562a6ef (diff)
downloadnixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.tar
nixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.tar.gz
nixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.tar.bz2
nixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.tar.lz
nixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.tar.xz
nixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.tar.zst
nixpkgs-2d1dc67fe1d2abbd86051c59eaa597ef85c09129.zip
aspellDicts.is, aspellDicts.nb: fix build on darwin
Diffstat (limited to 'pkgs/development/libraries/aspell')
-rw-r--r--pkgs/development/libraries/aspell/dictionaries.nix20
1 files changed, 20 insertions, 0 deletions
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;