Add missing opencamlib for blender

This commit is contained in:
David C
2023-05-15 20:07:01 -04:00
parent 291db5d45b
commit 5ec1b183c0
2 changed files with 36 additions and 1 deletions

View File

@@ -1,6 +1,41 @@
{ lib, config, pkgs, ... }: let { lib, config, pkgs, ... }: let
py3 = pkgs.python3; py3 = pkgs.python3;
py3Pkgs = py3.pkgs; py3Pkgs = py3.pkgs;
# For 3D CNC machining
opencamlib = py3Pkgs.toPythonModule (pkgs.stdenv.mkDerivation rec {
pname = "opencamlib";
version = "2019.07";
nativeBuildInputs = (with pkgs;[
cmake
git
doxygen
boost
texlive.combined.scheme-full
]);
propagatedNativeBuildInputs = (with pkgs; [
py3
py3.pkgs.boost
py3.pkgs.vtk
]);
postPatch = ''
mkdir -p $out/${py3.sitePackages}/{lib,ocl}
sed -e 's#LIBRARY DESTINATION ''${PYTHON_ARCH_PACKAGES}#LIBRARY DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
sed -e 's#DESTINATION ''${PYTHON_SITE_PACKAGES}#DESTINATION '"$out"'/${py3.sitePackages}#g' -i src/pythonlib/pythonlib.cmake
'';
cmakeFlags = [
"-DVERSION_STRING=2019.07"
"-DBUILD_CXX_LIB=ON"
"-DBUILD_PY_LIB=ON"
"-DUSE_PY_3=ON"
"-DCMAKE_BUILD_TYPE=Release"
];
src = pkgs.fetchFromGitHub {
owner = "aewallin";
repo = "opencamlib";
rev = "2019.07";
sha256 = "1a8pxp1mh8x3bfsb0l97vgxrpk482p7q9jprkd4m9hv69vva2bdz";
};
});
equation = py3Pkgs.buildPythonPackage { equation = py3Pkgs.buildPythonPackage {
pname = "Equation"; pname = "Equation";
version = "1.2.01"; version = "1.2.01";

View File

@@ -47,7 +47,7 @@
python-lsp-server python-lsp-server
opencamlib opencamlib
])); ]));
in in {
# if you also want support for flakes # if you also want support for flakes
nixpkgs.overlays = [(self: super: rec { nixpkgs.overlays = [(self: super: rec {
freecad = super.freecad.override { freecad = super.freecad.override {