Skip to content

Commit

Permalink
aspellDicts.is, aspellDicts.nb: fix build on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored and bjornfor committed Nov 7, 2022
1 parent 58227c4 commit 2d1dc67
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkgs/development/libraries/aspell/dictionaries.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2d1dc67

Please sign in to comment.