11 singleWordlist ? null,
14 stdenv.mkDerivation rec {
16 version = "2020.12.07";
18 src = fetchFromGitHub {
21 rev = "rel-${version}";
22 sha256 = "sha256-J61jhpnZcXMnoGlSuSCrKDZnnyp3Snjr+fUpTVKX64g=";
26 substituteInPlace scowl/src/Makefile \
37 buildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv;
39 env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
43 export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}$PWD/varcon"
46 postBuild = lib.optionalString (singleWordlist == null) ''
54 enableParallelBuilding = false;
57 if singleWordlist == null then
61 mkdir -p "$out/share/scowl"
62 mkdir -p "$out/lib" "$out/share/hunspell" "$out/share/myspell"
63 mkdir -p "$out/share/dict"
65 cp -r scowl/speller/aspell "$out/lib/aspell"
66 cp scowl/speller/*.{aff,dic} "$out/share/hunspell"
67 ln -s "$out/share/hunspell" "$out/share/myspell/dicts"
69 cp scowl/final/* "$out/share/scowl"
73 for region in american british british_s british_z canadian australian; do
94 regcode_var="$regcode"
95 if test "$region" = british; then
99 echo $region $regcode $regcode_sz
100 for s in 10 20 30 35 40 50 55 60 70 80 90 95; do
101 ./mk-list $regcode $s > "$out/share/dict/w$region.$s"
102 ./mk-list --variants=1 $regcode_var $s > "$out/share/dict/w$region.variants.$s"
103 ./mk-list --variants=2 $regcode_var $s > "$out/share/dict/w$region.acceptable.$s"
105 ./mk-list $regcode 60 > "$out/share/dict/w$region.txt"
106 ./mk-list --variants=1 $regcode_var 60 > "$out/share/dict/w$region.variants.txt"
107 ./mk-list --variants=2 $regcode_var 80 > "$out/share/dict/w$region.scrabble.txt"
109 ./mk-list --variants=1 en-gb 60 > "$out/share/dict/words.variants.txt"
110 ./mk-list --variants=1 en-gb 80 > "$out/share/dict/words.scrabble.txt"
111 ./mk-list en-gb-ise 60 > "$out/share/dict/words.txt"
118 mkdir -p "$out/share/dict"
120 ./mk-list ${singleWordlist} > "$out/share/dict/words.txt"
124 description = "Spell checker oriented word lists";
125 license = lib.licenses.mit;
126 maintainers = [ lib.maintainers.raskin ];
127 platforms = lib.platforms.unix;
128 homepage = "http://wordlist.aspell.net/";