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