Merge pull request #234458 from name-snrl/languagetool-rust

languagetool-rust: init at 2.1.1
This commit is contained in:
Azat Bahawi 2023-05-27 22:44:15 +03:00 committed by GitHub
commit b65bce55a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 0 deletions

View file

@ -11050,6 +11050,11 @@
githubId = 1009523; githubId = 1009523;
name = "Ashijit Pramanik"; name = "Ashijit Pramanik";
}; };
name-snrl = {
github = "name-snrl";
githubId = 72071763;
name = "Yusup Urazaev";
};
namore = { namore = {
email = "namor@hemio.de"; email = "namor@hemio.de";
github = "namore"; github = "namore";

View file

@ -0,0 +1,56 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, installShellFiles
, pkg-config
, openssl
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "languagetool-rust";
version = "2.1.1";
src = fetchFromGitHub {
owner = "jeertmans";
repo = pname;
rev = "v${version}";
hash = "sha256-tgx1LcVAlBcgYAdtn4n5TiLzinmOImLoatGowUFHpUM=";
};
cargoHash = "sha256-8Q+Li4wLkS9/HlSdtfOFnojtUBojO3oUpNHkyOu5clA=";
buildFeatures = [ "full" ];
nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
checkFlags = [
# requires network access
"--skip=server::tests::test_server_check_data"
"--skip=server::tests::test_server_check_text"
"--skip=server::tests::test_server_languages"
"--skip=server::tests::test_server_ping"
"--skip=test_match_positions_1"
"--skip=test_match_positions_2"
"--skip=test_match_positions_3"
"--skip=test_match_positions_4"
"--skip=src/lib/lib.rs"
];
postInstall = ''
installShellCompletion --cmd ltrs \
--bash <($out/bin/ltrs completions bash) \
--fish <($out/bin/ltrs completions fish) \
--zsh <($out/bin/ltrs completions zsh)
'';
meta = with lib; {
description = "LanguageTool API in Rust";
homepage = "https://github.com/jeertmans/languagetool-rust";
license = licenses.mit;
maintainers = with maintainers; [ name-snrl ];
mainProgram = "ltrs";
};
}

View file

@ -5313,6 +5313,10 @@ with pkgs;
languagetool = callPackage ../tools/text/languagetool { }; languagetool = callPackage ../tools/text/languagetool { };
languagetool-rust = callPackage ../tools/text/languagetool-rust {
inherit (darwin.apple_sdk.frameworks) Security;
};
ldtk = callPackage ../applications/editors/ldtk { }; ldtk = callPackage ../applications/editors/ldtk { };
lepton = callPackage ../tools/graphics/lepton { }; lepton = callPackage ../tools/graphics/lepton { };