Merge pull request #255937 from GetPsyched/python-fluent

This commit is contained in:
Sandro
2024-07-19 13:41:22 +02:00
committed by GitHub
4 changed files with 162 additions and 0 deletions
@@ -0,0 +1,51 @@
{
buildPythonPackage,
fetchFromGitHub,
lib,
pytestCheckHook,
setuptools,
# dependencies
fluent-syntax,
pygments,
six,
}:
let
version = "1.0";
src = fetchFromGitHub {
owner = "projectfluent";
repo = "python-fluent";
rev = "fluent.pygments@${version}";
hash = "sha256-AR2uce3HS1ELzpoHmx7F/5/nrL+7KhYemw/00nmvLik=";
};
in
buildPythonPackage {
pname = "fluent-pygments";
inherit version;
pyproject = true;
inherit src;
sourceRoot = "${src.name}/fluent.pygments";
build-system = [ setuptools ];
dependencies = [
fluent-syntax
pygments
six
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "fluent.pygments" ];
meta = {
changelog = "https://github.com/projectfluent/python-fluent/blob/main/fluent.pygments/CHANGELOG.rst";
description = "Plugin for pygments to add syntax highlighting of Fluent files in Sphinx";
homepage = "https://projectfluent.org/python-fluent/fluent.pygments/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ getpsyched ];
};
}
@@ -0,0 +1,61 @@
{
buildPythonPackage,
fetchFromGitHub,
lib,
pytestCheckHook,
setuptools,
# dependencies
attrs,
babel,
fluent-syntax,
pytz,
typing-extensions,
}:
let
version = "0.4.0";
src = fetchFromGitHub {
owner = "projectfluent";
repo = "python-fluent";
rev = "fluent.runtime@${version}";
hash = "sha256-Crg6ybweOZ4B3WfLMOcD7+TxGEZPTHJUxr8ItLB4G+Y=";
};
in
buildPythonPackage {
pname = "fluent-runtime";
inherit version;
pyproject = true;
inherit src;
sourceRoot = "${src.name}/fluent.runtime";
build-system = [ setuptools ];
dependencies = [
attrs
babel
fluent-syntax
pytz
typing-extensions
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# https://github.com/projectfluent/python-fluent/pull/203
"test_timeZone"
];
pythonImportsCheck = [ "fluent.runtime" ];
meta = {
changelog = "https://github.com/projectfluent/python-fluent/blob/${src.rev}/fluent.runtime/CHANGELOG.rst";
description = "Localization library for expressive translations";
downloadPage = "https://github.com/projectfluent/python-fluent/releases/tag/${src.rev}";
homepage = "https://projectfluent.org/python-fluent/fluent.runtime/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ getpsyched ];
};
}
@@ -0,0 +1,44 @@
{
buildPythonPackage,
fetchFromGitHub,
lib,
pytestCheckHook,
setuptools,
typing-extensions,
}:
let
version = "0.19.0";
src = fetchFromGitHub {
owner = "projectfluent";
repo = "python-fluent";
rev = "fluent.syntax@${version}";
hash = "sha256-nULngwBG/ebICRDi6HMHBdT+r/oq6tbDL7C1iMZpMsA=";
};
in
buildPythonPackage {
pname = "fluent-syntax";
inherit version;
pyproject = true;
inherit src;
sourceRoot = "${src.name}/fluent.syntax";
build-system = [ setuptools ];
dependencies = [ typing-extensions ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "fluent.syntax" ];
meta = {
changelog = "https://github.com/projectfluent/python-fluent/blob/${src.rev}/fluent.syntax/CHANGELOG.md";
description = "Parse, analyze, process, and serialize Fluent files";
downloadPage = "https://github.com/projectfluent/python-fluent/releases/tag/${src.rev}";
homepage = "https://projectfluent.org/python-fluent/fluent.syntax/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ getpsyched ];
};
}
+6
View File
@@ -4522,6 +4522,12 @@ self: super: with self; {
fluent-logger = callPackage ../development/python-modules/fluent-logger { };
fluent-pygments = callPackage ../development/python-modules/python-fluent/fluent-pygments.nix { };
fluent-runtime = callPackage ../development/python-modules/python-fluent/fluent-runtime.nix { };
fluent-syntax = callPackage ../development/python-modules/python-fluent/fluent-syntax.nix { };
flufl-bounce = callPackage ../development/python-modules/flufl/bounce.nix { };
flufl-i18n = callPackage ../development/python-modules/flufl/i18n.nix { };