1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, icu, catch2 }:
2
3stdenv.mkDerivation rec {
4 pname = "nuspell";
5 version = "5.1.2";
6
7 src = fetchFromGitHub {
8 owner = "nuspell";
9 repo = "nuspell";
10 rev = "v${version}";
11 sha256 = "sha256-nGC8Um9GutJZXlUcUCK0IiHxMaZmeoe4febw/jC2dRU=";
12 };
13
14 nativeBuildInputs = [ cmake pkg-config ];
15 buildInputs = [ icu ];
16
17 outputs = [ "out" "lib" "dev" ];
18
19 postPatch = ''
20 rm -rf external/Catch2
21 ln -sf ${catch2.src} external/Catch2
22 '';
23
24 meta = with lib; {
25 description = "Free and open source C++ spell checking library";
26 homepage = "https://nuspell.github.io/";
27 platforms = platforms.all;
28 maintainers = with maintainers; [ fpletz ];
29 license = licenses.lgpl3Plus;
30 changelog = "https://github.com/nuspell/nuspell/blob/v${version}/CHANGELOG.md";
31 };
32}