@@ -1,82 +0,0 @@
1−{ lib, mkDerivation, wrapQtAppsHook, callPackage, fetchgit, cmake, jq, python3, qtbase, qtquickcontrols2 }:
2−
3−let
4− # admittedly, we're using (printer firmware) blobs when we could compile them ourselves.
5− curaBinaryDataVersion = "3.6.21"; # Marlin v2.0.0.174 for Bio, v2.0.0.144 for others.
6− curaBinaryData = fetchgit {
7− url = "https://code.alephobjects.com/diffusion/CBD/cura-binary-data.git";
8− rev = "5c75d0f6c10d8b7a903e2072a48cd1f08059509e";
9− sha256 = "1qdsj6rczwzdwzyr7nz7fnypbphckjrnwl8c9dr6izsxyzs465c4";
10− };
11−
12− libarcusLulzbot = callPackage ./libarcus.nix {
13− inherit (python3.pkgs) buildPythonPackage sip_4 pythonOlder;
14− };
15− libsavitarLulzbot = callPackage ./libsavitar.nix {
16− inherit (python3.pkgs) buildPythonPackage sip_4 pythonOlder;
17− };
18−
19− inherit (python3.pkgs) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
20− curaengine = callPackage ./curaengine.nix {
21− inherit libarcusLulzbot;
22− };
23− uraniumLulzbot = callPackage ./uranium.nix {
24− inherit callPackage libarcusLulzbot;
25− inherit (python3.pkgs) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
26− };
27−in
28−mkDerivation rec {
29− pname = "cura-lulzbot";
30− version = "3.6.21";
31−
32− src = fetchgit {
33− url = "https://code.alephobjects.com/source/cura-lulzbot.git";
34− rev = "7faeb18604c83004846a02c60cb240708db0034f";
35− sha256 = "10q38s8c8x6xkh1vns4p3iqa5y267vrjh5vq8h55mg1q5001scyq";
36− };
37−
38− buildInputs = [ qtbase qtquickcontrols2 ];
39− # numpy-stl temporarily disabled due to https://code.alephobjects.com/T8415
40− propagatedBuildInputs = with python3.pkgs; [ pyserial requests zeroconf ] ++ [ libsavitarLulzbot uraniumLulzbot libarcusLulzbot ]; # numpy-stl
41− nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
42−
43− cmakeFlags = [
44− "-DURANIUM_DIR=${uraniumLulzbot.src}"
45− "-DCURA_VERSION=${version}"
46− ];
47−
48− postPatch = ''
49− sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
50− sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
51− '';
52−
53− preFixup = ''
54− substituteInPlace "$out/bin/cura-lulzbot" --replace 'import cura.CuraApplication' 'import Savitar; import cura.CuraApplication'
55− ln -sT "${curaBinaryData}/cura/resources/firmware" "$out/share/cura/resources/firmware"
56− ln -sT "${uraniumLulzbot}/share/uranium" "$out/share/uranium"
57− ${jq}/bin/jq --arg out "$out" '.build=$out' >"$out/version.json" <<'EOF'
58− ${builtins.toJSON {
59− cura = version;
60− cura_version = version;
61− binarydata = curaBinaryDataVersion;
62− engine = curaengine.version;
63− libarcus = libarcusLulzbot.version;
64− libsavitar = libsavitarLulzbot.version;
65− uranium = uraniumLulzbot.version;
66− }}
67− EOF
68− '';
69−
70− postFixup = ''
71− wrapPythonPrograms
72− wrapQtApp "$out/bin/cura-lulzbot"
73− '';
74−
75− meta = with lib; {
76− description = "3D printer / slicing GUI built on top of the Uranium framework";
77− homepage = "https://code.alephobjects.com/diffusion/CURA/";
78− license = licenses.agpl3; # a partial relicense to LGPL has happened, but not certain that all AGPL bits are expunged
79− platforms = platforms.linux;
80− maintainers = with maintainers; [ chaduffy ];
81− };
82−}