aspellDicts.is, aspellDicts.nb: fix build on darwin

This commit is contained in:
Weijia Wang 2022-11-04 01:11:32 +01:00 committed by Bjørn Forsman
parent 58227c4de0
commit 2d1dc67fe1

View file

@ -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;