Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.pygerber: init at 2.4.2 #359437

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4165,6 +4165,12 @@
githubId = 71959829;
name = "Cleeyv";
};
clemjvdm = {
clemjvdm marked this conversation as resolved.
Show resolved Hide resolved
email = "clement.jvdm@gmail.com";
github = "clemjvdm";
githubId = 131002498;
name = "clement";
};
clerie = {
email = "nix@clerie.de";
github = "clerie";
Expand Down
91 changes: 91 additions & 0 deletions pkgs/development/python-modules/pygerber/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,

# build-system
poetry-core,

# dependencies
numpy,
click,
pillow,
pydantic,
pyparsing,
typing-extensions,
tzlocal,

# optional dependencies
pygls,
lsprotocol,
drawsvg,
pygments,
shapely,

}:

let
pillow_10_4 = pillow.overrideAttrs (prev: {
clemjvdm marked this conversation as resolved.
Show resolved Hide resolved
version = "10.4.0";
src = fetchFromGitHub {
owner = "python-pillow";
repo = "pillow";
rev = "refs/tags/10.4.0";
hash = "sha256-Q3yvFyJf4gFaVY9X4PlgCE2rU1l9NEXkHBaNZfoHhvU=";
};
});

in
buildPythonPackage rec {
pname = "pygerber";
version = "2.4.2";
format = "pyproject";

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "Argmaster";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-+s89tHNTNP+0VMilfDczbOBG/e3DuUBu0113US69KKM=";
};

nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
numpy
click
pillow_10_4
pydantic
pyparsing
typing-extensions
tzlocal
];

passthru.optional-dependencies = {
language_server = [
pygls
lsprotocol
];
svg = [ drawsvg ];
pygments = [ pygments ];
shapely = [ shapely ];
all = [
pygls
lsprotocol
drawsvg
pygments
shapely
];
};

pythonImportsCheck = [ "pygerber" ];

meta = {
description = "PyGerber is a Python implementation of Gerber X3/X2 format. It is based on Ucamco's The Gerber Layer Format Specification.";
homepage = "https://github.com/Argmaster/pygerber";
changelog = "https://argmaster.github.io/pygerber/stable/Changelog.html";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ clemjvdm ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10414,6 +10414,8 @@ self: super: with self; {

pygelf = callPackage ../development/python-modules/pygelf { };

pygerber = callPackage ../development/python-modules/pygerber { };

pygments-style-github = callPackage ../development/python-modules/pygments-style-github { };

pygnmi = callPackage ../development/python-modules/pygnmi { };
Expand Down
Loading