9 stdenv.mkDerivation rec {
13 src = fetchFromGitHub {
14 owner = "snowballstem";
17 sha256 = "sha256-qXrypwv/I+5npvGHGsHveijoui0ZnoGYhskCfLkewVE=";
20 nativeBuildInputs = [ perl ];
26 + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
27 substituteInPlace GNUmakefile \
28 --replace './snowball' '${lib.getBin buildPackages.libstemmer}/bin/snowball'
31 makeTarget = "libstemmer.a";
35 install -Dt $out/lib libstemmer.a
36 install -Dt $out/include include/libstemmer.h
37 install -Dt $out/bin {snowball,stemwords}
42 description = "Snowball Stemming Algorithms";
43 homepage = "https://snowballstem.org/";
44 license = licenses.bsd3;
45 maintainers = with maintainers; [ fpletz ];
46 platforms = platforms.all;