1 { lib, stdenv, fetchFromGitHub, perl, buildPackages }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "snowballstem";
11 sha256 = "sha256-qXrypwv/I+5npvGHGsHveijoui0ZnoGYhskCfLkewVE=";
14 nativeBuildInputs = [ perl ];
18 '' + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
19 substituteInPlace GNUmakefile \
20 --replace './snowball' '${lib.getBin buildPackages.libstemmer}/bin/snowball'
23 makeTarget = "libstemmer.a";
27 install -Dt $out/lib libstemmer.a
28 install -Dt $out/include include/libstemmer.h
29 install -Dt $out/bin {snowball,stemwords}
34 description = "Snowball Stemming Algorithms";
35 homepage = "https://snowballstem.org/";
36 license = licenses.bsd3;
37 maintainers = with maintainers; [ fpletz ];
38 platforms = platforms.all;