diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/nuspell')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/nuspell/default.nix | 29 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix | 13 |
2 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/nuspell/default.nix b/nixpkgs/pkgs/development/libraries/nuspell/default.nix new file mode 100644 index 000000000000..b667dea8d49f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/nuspell/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, icu, catch2 }: + +stdenv.mkDerivation rec { + name = "nuspell-${version}"; + version = "2.2.0"; + + src = fetchFromGitHub { + owner = "nuspell"; + repo = "nuspell"; + rev = "v${version}"; + sha256 = "17khkb1sxn1p6rfql72l7a4lxafbxj0dwi95hsmyi6wajvfrg9sy"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ boost icu ]; + + enableParallelBuilding = true; + + postPatch = '' + rm -rf external/Catch2 + ln -sf ${catch2.src} external/Catch2 + ''; + + meta = with stdenv.lib; { + description = "Free and open source C++ spell checking library"; + homepage = "https://nuspell.github.io/"; + maintainers = with maintainers; [ fpletz ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix b/nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix new file mode 100644 index 000000000000..4386542ff20e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix @@ -0,0 +1,13 @@ +{ stdenv, lib, nuspell, makeWrapper, dicts ? [] }: +with lib; +let + searchPath = makeSearchPath "share/hunspell" dicts; +in +stdenv.mkDerivation { + name = (appendToName "with-dicts" nuspell).name; + buildInputs = [ makeWrapper ]; + buildCommand = '' + makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${searchPath} + ''; + meta = removeAttrs nuspell.meta ["outputsToInstall"]; +} |