Skip to content

Commit da0b6a3

Browse files
committed
build123d: init at 0.7.0
1 parent 2e6c771 commit da0b6a3

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

pkgs/python/build123d/default.nix

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
buildPythonPackage,
3+
fetchFromGitHub,
4+
# Buildtime dependencies
5+
git,
6+
pytestCheckHook,
7+
setuptools-scm,
8+
# Runtime dependencies
9+
anytree,
10+
ezdxf,
11+
ipython,
12+
numpy,
13+
ocp,
14+
ocpsvg,
15+
py-lib3mf,
16+
scipy,
17+
svgpathtools,
18+
trianglesolver,
19+
}:
20+
let
21+
pname = "build123d";
22+
version = "0.7.0";
23+
src = fetchFromGitHub {
24+
owner = "gumyr";
25+
repo = pname;
26+
rev = "v${version}";
27+
hash = "sha256-21H4WexV6NbeLZdX1Ht5+opaOQrd9Tff1nH874r/agI=";
28+
};
29+
in
30+
buildPythonPackage {
31+
inherit src pname version;
32+
pyproject = true;
33+
34+
patchPhase = ''
35+
substituteInPlace pyproject.toml \
36+
--replace "cadquery-ocp" "ocp"
37+
'';
38+
39+
nativeBuildInputs = [
40+
git
41+
pytestCheckHook
42+
setuptools-scm
43+
];
44+
45+
propagatedBuildInputs = [
46+
anytree
47+
ezdxf
48+
ipython
49+
numpy
50+
ocp
51+
ocpsvg
52+
py-lib3mf
53+
scipy
54+
svgpathtools
55+
trianglesolver
56+
];
57+
58+
disabledTests = [
59+
# These attempt to access the network
60+
"test_assembly_with_oriented_parts"
61+
"test_move_single_object"
62+
"test_single_label_color"
63+
"test_single_object"
64+
# Overly strict test
65+
"test_version"
66+
# TODO: why does this segfault
67+
"test_ellipse_rotation"
68+
];
69+
70+
}

pkgs/python/overlay.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
ocp,
55
}:
66
final: prev: {
7+
build123d = final.callPackage ./build123d { };
78
cadquery = final.callPackage ./cadquery { };
89
casadi = final.toPythonModule (casadi.override { pythonSupport = true; });
910
libclang = prev.libclang.override { llvmPackages = llvmPackages_15; };

0 commit comments

Comments
 (0)