universedesktop: variety of changes
This commit is contained in:
@@ -1,74 +1,4 @@
|
||||
{ lib, config, pkgs, ... }: let
|
||||
# FreeCAD uses pyside2 (qt 5.15) which doesn't support > 3.10
|
||||
py3 = pkgs.python310;
|
||||
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";
|
||||
};
|
||||
});
|
||||
|
||||
py3Cad = py3.withPackages (p: (with p; [
|
||||
numpy
|
||||
scipy
|
||||
seaborn
|
||||
pandas
|
||||
matplotlib
|
||||
ipython
|
||||
python-lsp-server
|
||||
opencamlib
|
||||
]));
|
||||
in {
|
||||
# if you also want support for flakes
|
||||
nixpkgs.overlays = [(self: super: rec {
|
||||
freecad = super.freecad.override {
|
||||
stdenv = super.ccacheStdenv;
|
||||
python = py3Cad;
|
||||
boost = py3Pkgs.boost;
|
||||
inherit (py3Pkgs)
|
||||
gitpython
|
||||
matplotlib
|
||||
pivy
|
||||
ply
|
||||
pycollada
|
||||
pyside2
|
||||
pyside2-tools
|
||||
pyyaml
|
||||
scipy
|
||||
shiboken2;
|
||||
};
|
||||
})];
|
||||
|
||||
{ lib, config, pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
openscad
|
||||
freecad
|
||||
|
||||
Reference in New Issue
Block a user