summary refs log tree commit diff
path: root/pkgs/development/libraries/nuspell/default.nix
blob: 9369b8cb5f29891137f066808c7c38c4484deec3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, icu, catch2 }:

stdenv.mkDerivation rec {
  pname = "nuspell";
  version = "5.1.2";

  src = fetchFromGitHub {
    owner = "nuspell";
    repo = "nuspell";
    rev = "v${version}";
    sha256 = "sha256-nGC8Um9GutJZXlUcUCK0IiHxMaZmeoe4febw/jC2dRU=";
  };

  nativeBuildInputs = [ cmake pkg-config ];
  propagatedBuildInputs = [ icu ];

  outputs = [ "out" "lib" "dev" ];

  postPatch = ''
    rm -rf external/Catch2
    ln -sf ${catch2.src} external/Catch2
  '';

  meta = with lib; {
    description = "Free and open source C++ spell checking library";
    homepage = "https://nuspell.github.io/";
    platforms = platforms.all;
    maintainers = with maintainers; [ fpletz ];
    license = licenses.lgpl3Plus;
    changelog = "https://github.com/nuspell/nuspell/blob/v${version}/CHANGELOG.md";
  };
}