1 { mkDerivation, lib, fetchFromGitHub, cmake, python3, qtbase,
2 qtquickcontrols2, qtgraphicaleffects, curaengine, plugins ? [] }:
8 src = fetchFromGitHub {
12 sha256 = "sha256-R88SdAxx3tkQCDInrFTKad1tPSDTSYaVAPUVmdk94Xk=";
15 materials = fetchFromGitHub {
17 repo = "fdm_materials";
19 sha256 = "sha256-7y4OcbeQHv+loJ4cMgPU0e818Zsv90EwARdztNWS8zM=";
22 buildInputs = [ qtbase qtquickcontrols2 qtgraphicaleffects ];
23 propagatedBuildInputs = with python3.pkgs; [
24 libsavitar numpy-stl pyserial requests uranium zeroconf pynest2d
25 sentry-sdk trimesh keyring
27 nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
30 "-DURANIUM_DIR=${python3.pkgs.uranium.src}"
31 "-DCURA_VERSION=${version}"
35 # hacky workaround for https://github.com/NixOS/nixpkgs/issues/59901
36 "--set OMP_NUM_THREADS 1"
40 sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
41 sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
45 mkdir -p $out/share/cura/resources/materials
46 cp ${materials}/*.fdm_material $out/share/cura/resources/materials/
47 mkdir -p $out/lib/cura/plugins
48 for plugin in ${toString plugins}; do
49 ln -s $plugin/lib/cura/plugins/* $out/lib/cura/plugins
55 wrapQtApp $out/bin/cura
59 description = "3D printer / slicing GUI built on top of the Uranium framework";
61 homepage = "https://github.com/Ultimaker/Cura";
62 license = licenses.lgpl3Plus;
63 platforms = platforms.linux;
64 maintainers = with maintainers; [ abbradar gebner ];