Skip to content

Commit

Permalink
add build123d expression
Browse files Browse the repository at this point in the history
  • Loading branch information
erooke committed May 15, 2024
1 parent b0f1096 commit 3777038
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
57 changes: 57 additions & 0 deletions expressions/build123d.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
buildPythonPackage,
fetchFromGitHub,
# Buildtime dependencies
git,
pytestCheckHook,
setuptools-scm,
# Runtime dependencies
anytree,
ezdxf,
ipython,
numpy,
ocp,
ocpsvg,
py-lib3mf,
scipy,
svgpathtools,
trianglesolver,
vtk,
}: let
pname = "build123d";
# TODO: current version is 0.5.0 but it requires lib3mf version 2.3.1 nix
# currently has 2.2.0 packaged. Either need to package updated version
# ourself our wait for upstream
version = "0.4.0";
src = fetchFromGitHub {
owner = "gumyr";
repo = pname;
rev = "v${version}";
deepClone = true;
hash = "sha256-+G+sjbRH8HbO8Gt6QRRjVQiwUNKTiqnGJdvjtTRFVgA=";
};
in
buildPythonPackage {
inherit src pname version;
format = "pyproject";

nativeBuildInputs = [
git
pytestCheckHook
setuptools-scm
];

propagatedBuildInputs = [
anytree
ezdxf
ipython
numpy
ocp
ocpsvg
py-lib3mf
scipy
svgpathtools
trianglesolver
vtk
];
}
2 changes: 2 additions & 0 deletions expressions/py-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@
py-lib3mf = self.callPackage ./py-lib3mf.nix {};

trianglesolver = self.callPackage ./trianglesolver.nix {};

build123d = self.callPackage ./build123d.nix {};
}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
cq-warehouse = python.pkgs.callPackage ./expressions/cq-warehouse.nix { };
in rec {
packages = {
inherit (python.pkgs) cadquery;
inherit (python.pkgs) cadquery build123d;
inherit cq-kit cq-warehouse;

cq-editor = pkgs.libsForQt5.callPackage ./expressions/cq-editor.nix {
Expand Down

0 comments on commit 3777038

Please sign in to comment.