571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ 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;
|
|
};
|
|
}
|