git.iko.soy/typeable/nixpkgs
on master help sign in
curaLulzbot: 15.02.1-1.03-5064 -> 3.6.18 (#61054)

curaLulzbot: 15.02.1-1.03-5064 -> 3.6.18

commit2371928fd132aad1c385a00a465868d035d88343 authorGabriel Ebner <gebner@gebner.org> dateThu 8 Aug 2019, 09:08 (7 years ago) parent073730c784c69a
8 files changed+230−62
pkgs/applications/misc/cura/lulzbot.nix−58 pkgs/applications/misc/cura/lulzbot/curaengine.nix+26 pkgs/applications/misc/cura/lulzbot/default.nix+78 pkgs/applications/misc/cura/lulzbot/libarcus.nix+33 pkgs/applications/misc/cura/lulzbot/libsavitar.nix+33 pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patch+16 pkgs/applications/misc/cura/lulzbot/uranium.nix+41 pkgs/top-level/all-packages.nix+3−4
pkgs/applications/misc/cura/lulzbot.nixdeleted−58
@@ -1,58 +0,0 @@
1−{ stdenv, fetchurl, dpkg, bash, python27Packages }:
2−
3−let
4− py = python27Packages;
5−in
6−stdenv.mkDerivation rec {
7− name = "cura-lulzbot-${version}";
8− version = "15.02.1-1.03-5064";
9−
10− src =
11− if stdenv.hostPlatform.system == "x86_64-linux" then
12− fetchurl {
13− url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb";
14− sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg";
15− }
16− else if stdenv.hostPlatform.system == "i686-linux" then
17− fetchurl {
18− url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb";
19− sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1";
20− }
21− else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
22−
23− python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
24− pythonPath = python_deps;
25− propagatedBuildInputs = python_deps;
26− buildInputs = [ dpkg bash py.wrapPython ];
27−
28− phases = [ "unpackPhase" "installPhase" ];
29− unpackPhase = "dpkg-deb -x ${src} ./";
30−
31− installPhase = ''
32− mkdir -p $out/bin
33− cp -r usr/share $out/share
34− find $out/share -type f -exec sed -i 's|/usr/share/cura|$out/share/cura|g' "{}" \;
35−
36− cat <<EOT > $out/bin/cura
37− #!${bash}/bin/bash
38− PYTHONPATH=$PYTHONPATH:$out/share/cura ${py.python}/bin/python $out/share/cura/cura.py "\$@"
39− EOT
40−
41− chmod 555 $out/bin/cura
42− '';
43−
44− meta = with stdenv.lib; {
45− description = "3D printing host software for the Lulzbot";
46−
47− longDescription = ''
48− Cura LulzBot Edition is a fork of the 3D printing/slicing
49− software from Ultimaker, with changes to support 3D printers
50− from Aleph Objects.
51− '';
52−
53− homepage = https://www.lulzbot.com/cura/;
54− license = licenses.agpl3;
55− platforms = platforms.linux;
56− maintainers = with maintainers; [ pjones ];
57− };
58−}
pkgs/applications/misc/cura/lulzbot/curaengine.nixnew file+26
@@ -0,0 +1,26 @@
1+{ stdenv, callPackage, fetchgit, fetchpatch, cmake, libarcusLulzbot, stb, protobuf }:
2+
3+stdenv.mkDerivation rec {
4+ name = "curaengine-lulzBot-${version}";
5+ version = "3.6.18";
6+
7+ src = fetchgit {
8+ url = https://code.alephobjects.com/source/curaengine-lulzbot.git;
9+ rev = "ec6a1a0f0aa387ef97e5c106633cf8d7fb9cd00d";
10+ sha256 = "0wdkvg1hmqp1gaym804lw09x4ngf5ffasd861jhflpy7djbmkfn8";
11+ };
12+
13+ nativeBuildInputs = [ cmake ];
14+ buildInputs = [ libarcusLulzbot stb protobuf ];
15+
16+ cmakeFlags = [ "-DCURA_ENGINE_VERSION=${version}" ];
17+
18+ meta = with stdenv.lib; {
19+ description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction";
20+ homepage = https://code.alephobjects.com/source/curaengine-lulzbot/;
21+ license = licenses.agpl3;
22+ platforms = platforms.linux;
23+ maintainers = with maintainers; [ chaduffy ];
24+ };
25+}
26+
pkgs/applications/misc/cura/lulzbot/default.nixnew file+78
@@ -0,0 +1,78 @@
1+{ lib, callPackage, fetchgit, cmake, jq, python3Packages, qtbase, qtquickcontrols2 }:
2+
3+let
4+ # admittedly, we're using (printer firmware) blobs when we could compile them ourselves.
5+ curaBinaryDataVersion = "3.6.18"; # Marlin v2.0.0.144. Keep this accurate wrt. the below.
6+ curaBinaryData = fetchgit {
7+ url = https://code.alephobjects.com/diffusion/CBD/cura-binary-data.git;
8+ rev = "cdc046494bbfe1f65bfb34659a257eef9a0100a0";
9+ sha256 = "0v0s036gxdjiglas2yzw95alv60sw3pq5k1zrrhmw9mxr4irrblb";
10+ };
11+
12+ libarcusLulzbot = callPackage ./libarcus.nix {
13+ inherit (python3Packages) buildPythonPackage sip pythonOlder;
14+ };
15+ libsavitarLulzbot = callPackage ./libsavitar.nix {
16+ inherit (python3Packages) buildPythonPackage sip pythonOlder;
17+ };
18+
19+ inherit (python3Packages) 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 (python3Packages) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
26+ };
27+in
28+python3Packages.buildPythonApplication rec {
29+ name = "cura-lulzbot-${version}";
30+ version = "3.6.18";
31+
32+ src = fetchgit {
33+ url = https://code.alephobjects.com/source/cura-lulzbot.git;
34+ rev = "71f1ac5a2b9f535175a3858a565930348358a9ca";
35+ sha256 = "0by06fpxvdgy858lwhsccbmvkdq67j2s1cz8v6jnrnjrsxk7vzka";
36+ };
37+
38+ format = "other"; # using cmake to build
39+ buildInputs = [ qtbase qtquickcontrols2 ];
40+ # numpy-stl temporarily disabled due to https://code.alephobjects.com/T8415
41+ propagatedBuildInputs = with python3Packages; [ pyserial requests zeroconf ] ++ [ libsavitarLulzbot uraniumLulzbot libarcusLulzbot ]; # numpy-stl
42+ nativeBuildInputs = [ cmake python3Packages.wrapPython ];
43+
44+ cmakeFlags = [
45+ "-DURANIUM_DIR=${uraniumLulzbot.src}"
46+ "-DCURA_VERSION=${version}"
47+ ];
48+
49+ postPatch = ''
50+ sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
51+ sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
52+ '';
53+
54+ preFixup = ''
55+ substituteInPlace "$out/bin/cura-lulzbot" --replace 'import cura.CuraApplication' 'import Savitar; import cura.CuraApplication'
56+ ln -sT "${curaBinaryData}/cura/resources/firmware" "$out/share/cura/resources/firmware"
57+ ln -sT "${uraniumLulzbot}/share/uranium" "$out/share/uranium"
58+ ${jq}/bin/jq --arg out "$out" '.build=$out' >"$out/version.json" <<'EOF'
59+ ${builtins.toJSON {
60+ cura = version;
61+ cura_version = version;
62+ binarydata = curaBinaryDataVersion;
63+ engine = curaengine.version;
64+ libarcus = libarcusLulzbot.version;
65+ libsavitar = libsavitarLulzbot.version;
66+ uranium = uraniumLulzbot.version;
67+ }}
68+ EOF
69+ '';
70+
71+ meta = with lib; {
72+ description = "3D printer / slicing GUI built on top of the Uranium framework";
73+ homepage = https://code.alephobjects.com/diffusion/CURA/;
74+ license = licenses.agpl3; # a partial relicense to LGPL has happened, but not certain that all AGPL bits are expunged
75+ platforms = platforms.linux;
76+ maintainers = with maintainers; [ chaduffy ];
77+ };
78+}
pkgs/applications/misc/cura/lulzbot/libarcus.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv, buildPythonPackage, fetchgit, fetchurl, cmake, sip, protobuf, pythonOlder }:
2+
3+buildPythonPackage rec {
4+ pname = "libarcus";
5+ version = "3.6.18";
6+ format = "other";
7+
8+ src = fetchgit {
9+ url = https://code.alephobjects.com/source/arcus.git;
10+ rev = "c795c0644591703ce04e1fd799fc97b1539031aa";
11+ sha256 = "1yap9wbqxbjx3kqyqcsldny4mlcm33ywiwpdjlfgs0wjahfg4ip0";
12+ };
13+
14+ disabled = pythonOlder "3.4.0";
15+
16+ propagatedBuildInputs = [ sip ];
17+ nativeBuildInputs = [ cmake ];
18+ buildInputs = [ protobuf ];
19+
20+ postPatch = ''
21+ # To workaround buggy SIP detection which overrides PYTHONPATH
22+ sed -i '/SET(ENV{PYTHONPATH}/d' cmake/FindSIP.cmake
23+ '';
24+
25+ meta = with stdenv.lib; {
26+ description = "Communication library between internal components for Ultimaker software";
27+ homepage = https://code.alephobjects.com/source/arcus/;
28+ license = licenses.lgpl3Plus;
29+ platforms = platforms.linux;
30+ maintainers = with maintainers; [ chaduffy ];
31+ };
32+}
33+
pkgs/applications/misc/cura/lulzbot/libsavitar.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv, buildPythonPackage, pythonOlder, fetchgit, cmake, sip }:
2+
3+buildPythonPackage rec {
4+ pname = "libsavitar-lulzbot";
5+ name = "libsavitar-lulzbot";
6+ version = "3.6.18";
7+ format = "other";
8+
9+ src = fetchgit {
10+ url = https://code.alephobjects.com/source/savitar.git;
11+ rev = "988a26d35b2a1d042f8c38938ccda77ab146af7d";
12+ sha256 = "146agw3a92azkgs5ahmn2rrck4an78m2r3pcss6ihmb60lx165k7";
13+ };
14+
15+ postPatch = ''
16+ # To workaround buggy SIP detection which overrides PYTHONPATH
17+ sed -i '/SET(ENV{PYTHONPATH}/d' cmake/FindSIP.cmake
18+ '';
19+
20+ nativeBuildInputs = [ cmake ];
21+
22+ propagatedBuildInputs = [ sip ];
23+
24+ disabled = pythonOlder "3.4.0";
25+
26+ meta = with stdenv.lib; {
27+ description = "C++ implementation of 3mf loading with SIP python bindings";
28+ homepage = https://github.com/Ultimaker/libSavitar;
29+ license = licenses.lgpl3Plus;
30+ platforms = platforms.unix;
31+ maintainers = with maintainers; [ chaduffy ];
32+ };
33+}
pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patchnew file+16
@@ -0,0 +1,16 @@
1+diff --git a/UM/Qt/Bindings/i18nCatalogProxy.py b/UM/Qt/Bindings/i18nCatalogProxy.py
2+index 7e2bb16c..cec70dd6 100644
3+--- a/UM/Qt/Bindings/i18nCatalogProxy.py
4++++ b/UM/Qt/Bindings/i18nCatalogProxy.py
5+@@ -86,9 +86,9 @@ class i18nCatalogProxy(QObject): # [CodeStyle: Ultimaker code style requires cla
6+ # \todo Move this to a more generic place so more things can use it.
7+ def _wrapFunction(self, engine, this_object, function):
8+ # JavaScript code that wraps the Python method call in a closure
9+- wrap_js = """function(this_object) {{
10++ wrap_js = """(function(this_object) {{
11+ return function({args}) {{ return this_object.{function}({args}) }}
12+- }}"""
13++ }})"""
14+
15+ # Get the function name and argument list.
16+ function_name = function.__name__
pkgs/applications/misc/cura/lulzbot/uranium.nixnew file+41
@@ -0,0 +1,41 @@
1+{ stdenv, callPackage, fetchurl, fetchgit, buildPythonPackage, fetchFromGitHub, python, cmake
2+, pyqt5, numpy, scipy, shapely, libarcusLulzbot, doxygen, gettext, pythonOlder }:
3+
4+buildPythonPackage rec {
5+ version = "3.6.18";
6+ pname = "uranium";
7+ name = "uraniumLulzbot";
8+ format = "other";
9+
10+ src = fetchgit {
11+ url = https://code.alephobjects.com/diffusion/U/uranium.git;
12+ rev = "33df88a7414375ac924ac761113baa48d2ced2b4";
13+ sha256 = "109cbv7y105crbrzfp70lmcr9n20ap5c97i5qd46fmxbx86yj7f8";
14+ };
15+
16+ disabled = pythonOlder "3.5.0";
17+
18+ buildInputs = [ python gettext ];
19+ propagatedBuildInputs = [ pyqt5 numpy scipy shapely libarcusLulzbot ];
20+ nativeBuildInputs = [ cmake doxygen ];
21+
22+ # Qt 5.12+ support; see https://code.alephobjects.com/rU70b73ba0a270799b9eacf78e400aa8b8ab3fb2ee
23+ patches = [ ./uranium-qt512-support.patch ];
24+
25+ postPatch = ''
26+ sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
27+ sed -i \
28+ -e "s,Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,Resources.addSearchPath(\"$out/share/uranium/resources\")," \
29+ -e "s,self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,self._plugin_registry.addPluginLocation(\"$out/lib/uranium/plugins\")," \
30+ UM/Application.py
31+ '';
32+
33+ meta = with stdenv.lib; {
34+ description = "A Python framework for building Desktop applications";
35+ homepage = https://code.alephobjects.com/diffusion/U/;
36+ license = licenses.lgpl3Plus;
37+ platforms = platforms.linux;
38+ maintainers = with maintainers; [ chaduffy ];
39+ };
40+}
41+
pkgs/top-level/all-packages.nix+3−4
@@ -20472,14 +20472,13 @@ in
2047220472 curaengine = curaengine_stable;
2047320473 };
2047420474
20475− curaengine = callPackage ../applications/misc/curaengine {
20476− inherit (python3.pkgs) libarcus;
20477− };
20475+ curaengine = callPackage ../applications/misc/curaengine { inherit (python3.pkgs) libarcus; };
20476+
2047820477 cura = qt5.callPackage ../applications/misc/cura { };
2047920478
2048020479 curaPlugins = callPackage ../applications/misc/cura/plugins.nix { };
2048120480
20482− curaLulzbot = callPackage ../applications/misc/cura/lulzbot.nix { };
20481+ curaLulzbot = qt5.callPackage ../applications/misc/cura/lulzbot/default.nix { };
2048320482
2048420483 curaByDagoma = callPackage ../applications/misc/curabydagoma { };
2048520484