1{
2 stdenv,
3 lib,
4 nuspell,
5 makeWrapper,
6 dicts ? [ ],
7}:
8
9let
10 searchPath = lib.makeSearchPath "share/hunspell" dicts;
11in
12stdenv.mkDerivation {
13 name = (lib.appendToName "with-dicts" nuspell).name;
14 nativeBuildInputs = [ makeWrapper ];
15 buildCommand = ''
16 makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
17 '';
18 meta = removeAttrs nuspell.meta [ "outputsToInstall" ];
19}