-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
pkgs/applications/graphics/inkscape/extensions/inkstitch/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters