From eee42c636ed32562968dcdf54171850ca1525683 Mon Sep 17 00:00:00 2001 From: Austin Platt Date: Mon, 28 Nov 2022 17:32:46 +0000 Subject: [PATCH] lttoolbox: init at 3.7.1 add checkPhase add licence information --- pkgs/applications/misc/lttoolbox/default.nix | 65 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/applications/misc/lttoolbox/default.nix diff --git a/pkgs/applications/misc/lttoolbox/default.nix b/pkgs/applications/misc/lttoolbox/default.nix new file mode 100644 index 000000000000..25dbeba7d953 --- /dev/null +++ b/pkgs/applications/misc/lttoolbox/default.nix @@ -0,0 +1,65 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, autoconf +, automake +, pkg-config +, utf8cpp +, libtool +, libxml2 +, icu +, python3 +}: + +stdenv.mkDerivation rec { + pname = "lttoolbox"; + version = "3.7.1"; + + src = fetchFromGitHub { + owner = "apertium"; + repo = "lttoolbox"; + rev = "refs/tags/v${version}"; + hash = "sha256-3lHXKtwQSrMGQEGOGr27e3kB2qKkTFZcEzeAnIm89Rg="; + }; + + patches = [ + # can be removed once the version goes past this commit + # https://github.com/apertium/lttoolbox/commit/e682fe18a96d5a865cfbd3e5661dbc7b3ace1821 + (fetchpatch { + url = "https://github.com/apertium/lttoolbox/commit/e682fe18a96d5a865cfbd3e5661dbc7b3ace1821.patch"; + hash = "sha256-VeP8Mv2KYxX+eVjIRw/jHbURaWN665+fiFaoT3VxAno="; + }) + ]; + + nativeBuildInputs = [ + autoconf + automake + pkg-config + utf8cpp + libtool + ]; + buildInputs = [ + libxml2 + icu + ]; + buildFlags = [ + "CPPFLAGS=-I${utf8cpp}/include/utf8cpp" + ]; + configurePhase = '' + ./autogen.sh --prefix $out + ''; + doCheck = true; + checkPhase = '' + ${python3}/bin/python3 tests/run_tests.py + ''; + + meta = with lib; { + description = "Finite state compiler, processor and helper tools used by apertium"; + homepage = "https://github.com/apertium/lttoolbox"; + maintainers = with maintainers; [ onthestairs ]; + changelog = "https://github.com/apertium/lttoolbox/releases/tag/v${version}"; + license = licenses.gpl2; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 67aaee744cdf..ec67c4538501 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10049,6 +10049,8 @@ with pkgs; lua = lua5_2_compat; }; + lttoolbox = callPackage ../applications/misc/lttoolbox { }; + ltwheelconf = callPackage ../applications/misc/ltwheelconf { }; lunatask = callPackage ../applications/misc/lunatask { };