summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjopejoe1 <johannes@joens.email>2024-07-25 19:38:36 +0200
committerjopejoe1 <johannes@joens.email>2024-08-28 20:14:22 +0200
commit185f7f400830b1f056c23aeecd103a2b74ecb23c (patch)
tree1dc96a9430d3cbe2f656eae17f2edafa3ef93ab4
parentpython3Packages.blackrenderer: init at 0.6.0 (diff)
downloadnixpkgs-185f7f400830b1f056c23aeecd103a2b74ecb23c.tar.gz
python3Packages.diffenator2: init at 0.4.3
-rw-r--r--pkgs/development/python-modules/diffenator2/default.nix95
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 97 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/diffenator2/default.nix b/pkgs/development/python-modules/diffenator2/default.nix
new file mode 100644
index 000000000000..e5297364fc18
--- /dev/null
+++ b/pkgs/development/python-modules/diffenator2/default.nix
@@ -0,0 +1,95 @@
+{
+ lib,
+ buildPythonPackage,
+ fetchFromGitHub,
+ pythonRelaxDepsHook,
+ pytestCheckHook,
+ poetry-core,
+ poetry-dynamic-versioning,
+ blackrenderer,
+ fonttools,
+ freetype-py,
+ gflanguages,
+ glyphsets,
+ jinja2,
+ ninja,
+ pillow,
+ protobuf,
+ pyahocorasick,
+ python-bidi,
+ selenium,
+ tqdm,
+ uharfbuzz,
+ unicodedata2,
+ youseedee,
+ numpy,
+}:
+
+buildPythonPackage rec {
+ pname = "diffenator2";
+ version = "0.4.3";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "googlefonts";
+ repo = "diffenator2";
+ rev = "refs/tags/v${version}";
+ hash = "sha256-zeNcNR14ieY6Inp4kOwIPXd6S+/wFdMFp6wbiqgB/iA=";
+ };
+
+ nativeBuildInputs = [ pythonRelaxDepsHook ];
+
+ pythonRelaxDeps = [ "protobuf" ];
+
+ build-system = [
+ poetry-core
+ poetry-dynamic-versioning
+ ];
+
+ dependencies = [
+ blackrenderer
+ fonttools
+ freetype-py
+ gflanguages
+ glyphsets
+ jinja2
+ ninja
+ pillow
+ protobuf
+ pyahocorasick
+ python-bidi
+ selenium
+ tqdm
+ uharfbuzz
+ unicodedata2
+ youseedee
+ numpy
+ ];
+
+ nativeCheckInputs = [ pytestCheckHook ];
+
+ disabledTests = [
+ # requires internet
+ "test_download_google_fonts_family_to_file"
+ "test_download_google_fonts_family_to_bytes"
+ "test_download_google_fonts_family_not_existing"
+ "test_download_latest_github_release"
+ ];
+
+ disabledTestPaths = [
+ # Want the files downloaded by the tests above
+ "tests/test_functional.py"
+ "tests/test_html.py"
+ "tests/test_matcher.py"
+ "tests/test_font.py"
+ ];
+
+ meta = {
+ description = "Font comparison tool that will not stop until your fonts are exhaustively compared";
+ homepage = "https://github.com/googlefonts/diffenator2";
+ changelog = "https://github.com/googlefonts/diffenator2/releases/tag/v${version}";
+ license = lib.licenses.asl20;
+ mainProgram = "diffenator2";
+ maintainers = with lib.maintainers; [ jopejoe1 ];
+ };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2cfc78d6dd1e..0407a0f6aeb8 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3121,6 +3121,8 @@ self: super: with self; {
diff-match-patch = callPackage ../development/python-modules/diff-match-patch { };
+ diffenator2 = callPackage ../development/python-modules/diffenator2 { };
+
diffimg = callPackage ../development/python-modules/diffimg { };
diffsync = callPackage ../development/python-modules/diffsync { };