inkscape-extensions.inkstitch: init at 3.1.0 (#358993)

* pyembroidery: init at 1.5.1-unstable-2024-06-06

* inkscape-extensions.inkstitch: init at 3.1.0
This commit is contained in:
Leah Amelia Chen
2024-12-10 18:11:13 -05:00
committed by GitHub
parent 027b2935ca
commit 7413ed0368
4 changed files with 129 additions and 0 deletions
@@ -44,6 +44,7 @@
mkdir -p $out/share/inkscape/extensions
cp ${inkcut}/share/inkscape/extensions/* $out/share/inkscape/extensions
'');
inkstitch = callPackage ./extensions/inkstitch { };
silhouette = callPackage ./extensions/silhouette { };
textext = callPackage ./extensions/textext {
pdflatex = texlive.combined.scheme-basic;
@@ -0,0 +1,72 @@
{
lib,
python3,
fetchFromGitHub,
gettext,
}:
let
version = "3.1.0";
in
python3.pkgs.buildPythonApplication {
pname = "inkstitch";
inherit version;
pyproject = false; # Uses a Makefile (yikes)
src = fetchFromGitHub {
owner = "inkstitch";
repo = "inkstitch";
rev = "refs/tags/v${version}";
hash = "sha256-CGhJsDRhElgemNv2BXqZr6Vi5EyBArFak7Duz545ivY=";
};
nativeBuildInputs = [
gettext
];
dependencies =
with python3.pkgs;
[
pyembroidery
inkex
wxpython
networkx
shapely
lxml
appdirs
numpy
jinja2
requests
# Upstream wants colormath2 yet still refers to it as colormath. Curious.
colormath
flask
fonttools
trimesh
scipy
diskcache
flask-cors
]
# Inkstitch uses the builtin tomllib instead when Python >=3.11
++ lib.optional (pythonOlder "3.11") tomli;
makeFlags = [ "manual" ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/inkscape/extensions
cp -a inx $out/share/inkscape/extensions/inkstitch
runHook postInstall
'';
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
];
meta = {
description = "Inkscape extension for machine embroidery design";
homepage = "https://inkstitch.org/";
license = with lib.licenses; [ gpl3Plus ];
maintainers = with lib.maintainers; [ pluiedev ];
};
}
@@ -0,0 +1,54 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
}:
let
pname = "pyembroidery";
# Mysteriously, the latest version published on PyPI has the version of 1.5.1,
# but the latest GitHub version stopped at 1.2.39. Further more Ink/Stitch requires the .exceptions
# module which is absent from the PyPI release.
# I guess this is *technically* the correct version name, but... yikes.
version = "1.5.1-unstable-2024-06-26";
in
buildPythonPackage {
inherit pname version;
pyproject = true;
src = fetchFromGitHub {
owner = "inkstitch";
repo = "pyembroidery";
rev = "b603b8d2b2bf91b5b0823a8a619562de5fd756e7";
hash = "sha256-cnWQ/ZScdXTFMLHdceyCLjgEkcwv3KuZHwXWlsYCcBA=";
};
build-system = [
setuptools
];
pythonImportsCheck = [
"pyembroidery"
];
nativeCheckInputs = [
pytestCheckHook
];
# Failed assertions.
# See https://github.com/inkstitch/pyembroidery/issues/108
disabledTests = [
"test_generic_write_gcode"
"test_jef_trims_commands"
];
meta = {
description = "Python library for the reading and writing of embroidery files";
homepage = "https://github.com/inkstitch/pyembroidery";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ pluiedev ];
};
}
+2
View File
@@ -10229,6 +10229,8 @@ self: super: with self; {
pybars3 = callPackage ../development/python-modules/pybars3 { };
pyembroidery = callPackage ../development/python-modules/pyembroidery { };
pymeta3 = callPackage ../development/python-modules/pymeta3 { };
pypemicro = callPackage ../development/python-modules/pypemicro { };