Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions pkgs/development/python-modules/python-fluent/fluent-pygments.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
61 changes: 61 additions & 0 deletions pkgs/development/python-modules/python-fluent/fluent-runtime.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
44 changes: 44 additions & 0 deletions pkgs/development/python-modules/python-fluent/fluent-syntax.nix
Original file line number Diff line number Diff line change
@@ -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" ];

Comment thread
GetPsyched marked this conversation as resolved.
Outdated
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 changes: 6 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4510,6 +4510,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 { };
Expand Down