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

Add build123d v0.7.0 #48

Open
wants to merge 10 commits into
base: main
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
68 changes: 68 additions & 0 deletions expressions/build123d.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
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";
version = "0.7.0";
src = fetchFromGitHub {
owner = "gumyr";
repo = pname;
rev = "v${version}";
deepClone = true;
hash = "sha256-Rq5ZhAHXfDUNeAGdpsfOUONL6gOEOwtUkWTo9FrQ8B0=";
};
in
buildPythonPackage {
inherit src pname version;
format = "pyproject";

patchPhase = ''
substituteInPlace pyproject.toml \
--replace "cadquery-ocp" "ocp"
'';

nativeBuildInputs = [
git
pytestCheckHook
setuptools-scm
];

propagatedBuildInputs = [
anytree
ezdxf
ipython
numpy
ocp
ocpsvg
py-lib3mf
scipy
svgpathtools
trianglesolver
vtk
];

disabledTests = [
# These attempt to access the network
"test_assembly_with_oriented_parts"
"test_move_single_object"
"test_single_label_color"
"test_single_object"
];

}
112 changes: 0 additions & 112 deletions expressions/casadi.nix

This file was deleted.

3 changes: 2 additions & 1 deletion expressions/cq-editor.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib
, mkDerivationWith
, python3Packages
# , fetchFromGitHub
# , fetchFromGitHub
, makeDesktopItem
, copyDesktopItems
, src
Expand All @@ -23,6 +23,7 @@ mkDerivationWith python3Packages.buildPythonApplication {
pyqtgraph
cq-kit
cq-warehouse
build123d
# spyder_3
spyder
pathpy
Expand Down
72 changes: 72 additions & 0 deletions expressions/lib3mf.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
automaticcomponenttoolkit,
pkg-config,
libzip,
gtest,
openssl,
libuuid,
libossp_uuid,
}:
stdenv.mkDerivation rec {
pname = "lib3mf";
version = "2.3.1";

src = fetchFromGitHub {
owner = "3MFConsortium";
repo = pname;
rev = "v${version}";
sha256 = "sha256-klssRLh4ktKSe1K3sHPlwXznU6GWe8csoioHT1xyYHQ=";
};

nativeBuildInputs = [cmake ninja pkg-config];

outputs = ["out" "dev"];

cmakeFlags = [
"-DCMAKE_INSTALL_INCLUDEDIR=include/lib3mf"
"-DUSE_INCLUDED_ZLIB=OFF"
"-DUSE_INCLUDED_LIBZIP=OFF"
"-DUSE_INCLUDED_GTEST=OFF"
"-DUSE_INCLUDED_SSL=OFF"
"-DLIB3MF_TESTS=OFF"
];

buildInputs =
[
libzip
gtest
openssl
]
++ (
if stdenv.isDarwin
then [libossp_uuid]
else [libuuid]
);

postPatch = ''
# This lets us build the tests properly on aarch64-darwin.
substituteInPlace CMakeLists.txt \
--replace 'SET(CMAKE_OSX_ARCHITECTURES "x86_64")' ""

# fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
sed -i 's,libdir=''${\(exec_\)\?prefix}/,libdir=,' lib3mf.pc.in

# replace bundled binaries
for i in AutomaticComponentToolkit/bin/act.*; do
ln -sf ${automaticcomponenttoolkit}/bin/act $i
done
'';

meta = with lib; {
description = "Reference implementation of the 3D Manufacturing Format file standard";
homepage = "https://3mf.io/";
license = licenses.bsd2;
maintainers = with maintainers; [gebner];
platforms = platforms.all;
};
}
60 changes: 0 additions & 60 deletions expressions/mumps.nix

This file was deleted.

37 changes: 37 additions & 0 deletions expressions/ocpsvg.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
buildPythonPackage,
fetchPypi,
# Buildtime dependencies
git,
pytestCheckHook,
setuptools-scm,
# Runtime dependencies
ocp,
svgpathtools,
svgelements,
}:
let
pname = "ocpsvg";
version = "0.2.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-61ZLN/Yk0ncPNtiSkE4V9mG+iqhEjzth19ceBHKyl60=";
};
in
buildPythonPackage {
inherit src pname version;
pyproject = true;

patchPhase = ''
substituteInPlace pyproject.toml \
--replace "cadquery-ocp" "ocp"
'';

build-system = [ setuptools-scm git ];

nativeCheckInputs = [ pytestCheckHook ];

dependencies = [ocp svgpathtools svgelements ];

}

Loading