Flake lock file updates:
• Updated input 'home-manager':
'github:nix-community/home-manager/6bba64781e4b7c1f91a733583defbd3e46b49408' (2023-10-10)
→ 'github:nix-community/home-manager/8765d4e38aa0be53cdeee26f7386173e6c65618d' (2023-11-03)
• Updated input 'nix-darwin':
'github:LnL7/nix-darwin/8b6ea26d5d2e8359d06278364f41fbc4b903b28a' (2023-10-03)
→ 'github:LnL7/nix-darwin/afe83cbc2e673b1f08d32dd0f70df599678ff1e7' (2023-10-27)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/5e4c2ada4fcd54b99d56d7bd62f384511a7e2593' (2023-10-11)
→ 'github:NixOS/nixpkgs/fa804edfb7869c9fb230e174182a8a1a7e512c40' (2023-11-02)
• Updated input 'sops-nix':
'github:Mic92/sops-nix/6b32358c22d2718a5407d39a8236c7bd9608f447' (2023-10-09)
→ 'github:Mic92/sops-nix/275b28593ef3a1b9d05b6eeda3ddce2f45f5c06f' (2023-11-03)
• Updated input 'sops-nix/nixpkgs':
'github:NixOS/nixpkgs/945559664c1dc5836173ee12896ba421d9b37181' (2023-10-07)
→ 'github:NixOS/nixpkgs/808c0d8c53c7ae50f82aca8e7df263225cf235bf' (2023-10-26)
• Updated input 'sops-nix/nixpkgs-stable':
'github:NixOS/nixpkgs/2f3b6b3fcd9fa0a4e6b544180c058a70890a7cc1' (2023-10-07)
→ 'github:NixOS/nixpkgs/d87c5d8c41c9b3b39592563242f3a448b5cc4bc9' (2023-10-29)
80 lines
1.9 KiB
Nix
80 lines
1.9 KiB
Nix
{ 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;
|
|
};
|
|
})];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
openscad
|
|
freecad
|
|
kicad
|
|
|
|
prusa-slicer
|
|
];
|
|
}
|