cura, curaengine: 14.04 -> 2.4.0

Move old Cura to {cura,curaengine}_stable

+148 -78
+1 -1
nixos/modules/services/misc/octoprint.nix
··· 7 7 cfg = config.services.octoprint; 8 8 9 9 baseConfig = { 10 - plugins.cura.cura_engine = "${pkgs.curaengine}/bin/CuraEngine"; 10 + plugins.cura.cura_engine = "${pkgs.curaengine_stable}/bin/CuraEngine"; 11 11 server.host = cfg.host; 12 12 server.port = cfg.port; 13 13 webcam.ffmpeg = "${pkgs.ffmpeg.bin}/bin/ffmpeg";
+22 -57
pkgs/applications/misc/cura/default.nix
··· 1 - { stdenv, python27Packages, curaengine, makeDesktopItem, fetchurl }: 2 - let 3 - py = python27Packages; 4 - version = "15.04"; 5 - in 1 + { stdenv, lib, fetchFromGitHub, cmake, python3, qtbase, makeQtWrapper, curaengine }: 2 + 6 3 stdenv.mkDerivation rec { 7 4 name = "cura-${version}"; 8 - 9 - src = fetchurl { 10 - url = "https://github.com/daid/Cura/archive/${version}.tar.gz"; 11 - sha256 = "0xbjvzhp8wzq9lnpmcg1fjf7j5h39bj5463sd5c8jzdjl96izizl"; 12 - }; 5 + version = "2.4.0"; 13 6 14 - desktopItem = makeDesktopItem { 15 - name = "Cura"; 16 - exec = "cura"; 17 - icon = "cura"; 18 - comment = "Cura"; 19 - desktopName = "Cura"; 20 - genericName = "3D printing host software"; 21 - categories = "GNOME;GTK;Utility;"; 7 + src = fetchFromGitHub { 8 + owner = "Ultimaker"; 9 + repo = "Cura"; 10 + rev = version; 11 + sha256 = "04iglmjg9rzmlfrll6g7bcckkla327938xh8qmbdfrh215aivdlp"; 22 12 }; 23 13 24 - python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ]; 25 - 26 - pythonPath = python_deps; 14 + buildInputs = [ qtbase ]; 15 + propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial ]; 16 + nativeBuildInputs = [ cmake python3.pkgs.wrapPython makeQtWrapper ]; 27 17 28 - propagatedBuildInputs = python_deps; 18 + cmakeFlags = [ "-DCMAKE_MODULE_PATH=${python3.pkgs.uranium}/share/cmake-${cmake.majorVersion}/Modules" ]; 29 19 30 - buildInputs = [ curaengine py.wrapPython ]; 20 + postPatch = '' 21 + sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt 22 + sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py 23 + ''; 31 24 32 - configurePhase = ""; 33 - buildPhase = ""; 34 - 35 - patches = [ ./numpy-cast.patch ]; 36 - 37 - installPhase = '' 38 - # Install Python code. 39 - site_packages=$out/lib/python2.7/site-packages 40 - mkdir -p $site_packages 41 - cp -r Cura $site_packages/ 42 - 43 - # Install resources. 44 - resources=$out/share/cura 45 - mkdir -p $resources 46 - cp -r resources/* $resources/ 47 - sed -i 's|os.path.join(os.path.dirname(__file__), "../../resources")|"'$resources'"|g' $site_packages/Cura/util/resources.py 48 - 49 - # Install executable. 50 - mkdir -p $out/bin 51 - cp Cura/cura.py $out/bin/cura 52 - chmod +x $out/bin/cura 53 - sed -i 's|#!/usr/bin/python|#!/usr/bin/env python|' $out/bin/cura 25 + postFixup = '' 54 26 wrapPythonPrograms 55 - 56 - # Make it find CuraEngine. 57 - echo "def getEngineFilename(): return '${curaengine}/bin/CuraEngine'" >> $site_packages/Cura/util/sliceEngine.py 58 - 59 - # Install desktop item. 60 - mkdir -p "$out"/share/applications 61 - cp "$desktopItem"/share/applications/* "$out"/share/applications/ 62 - mkdir -p "$out"/share/icons 63 - ln -s "$resources/images/c.png" "$out"/share/icons/cura.png 27 + mv $out/bin/cura $out/bin/.cura-noqtpath 28 + makeQtWrapper $out/bin/.cura-noqtpath $out/bin/cura 64 29 ''; 65 30 66 31 meta = with stdenv.lib; { 67 - description = "3D printing host software"; 68 - homepage = https://github.com/daid/Cura; 32 + description = "3D printer / slicing GUI built on top of the Uranium framework"; 33 + homepage = "https://github.com/Ultimaker/Cura"; 69 34 license = licenses.agpl3; 70 35 platforms = platforms.linux; 71 - maintainers = with stdenv.lib.maintainers; [ the-kenny ]; 36 + maintainers = with maintainers; [ abbradar ]; 72 37 }; 73 38 }
+73
pkgs/applications/misc/cura/stable.nix
··· 1 + { stdenv, python27Packages, curaengine, makeDesktopItem, fetchurl }: 2 + let 3 + py = python27Packages; 4 + version = "15.04"; 5 + in 6 + stdenv.mkDerivation rec { 7 + name = "cura-${version}"; 8 + 9 + src = fetchurl { 10 + url = "https://github.com/daid/Cura/archive/${version}.tar.gz"; 11 + sha256 = "0xbjvzhp8wzq9lnpmcg1fjf7j5h39bj5463sd5c8jzdjl96izizl"; 12 + }; 13 + 14 + desktopItem = makeDesktopItem { 15 + name = "Cura"; 16 + exec = "cura"; 17 + icon = "cura"; 18 + comment = "Cura"; 19 + desktopName = "Cura"; 20 + genericName = "3D printing host software"; 21 + categories = "GNOME;GTK;Utility;"; 22 + }; 23 + 24 + python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ]; 25 + 26 + pythonPath = python_deps; 27 + 28 + propagatedBuildInputs = python_deps; 29 + 30 + buildInputs = [ curaengine py.wrapPython ]; 31 + 32 + configurePhase = ""; 33 + buildPhase = ""; 34 + 35 + patches = [ ./numpy-cast.patch ]; 36 + 37 + installPhase = '' 38 + # Install Python code. 39 + site_packages=$out/lib/python2.7/site-packages 40 + mkdir -p $site_packages 41 + cp -r Cura $site_packages/ 42 + 43 + # Install resources. 44 + resources=$out/share/cura 45 + mkdir -p $resources 46 + cp -r resources/* $resources/ 47 + sed -i 's|os.path.join(os.path.dirname(__file__), "../../resources")|"'$resources'"|g' $site_packages/Cura/util/resources.py 48 + 49 + # Install executable. 50 + mkdir -p $out/bin 51 + cp Cura/cura.py $out/bin/cura 52 + chmod +x $out/bin/cura 53 + sed -i 's|#!/usr/bin/python|#!/usr/bin/env python|' $out/bin/cura 54 + wrapPythonPrograms 55 + 56 + # Make it find CuraEngine. 57 + echo "def getEngineFilename(): return '${curaengine}/bin/CuraEngine'" >> $site_packages/Cura/util/sliceEngine.py 58 + 59 + # Install desktop item. 60 + mkdir -p "$out"/share/applications 61 + cp "$desktopItem"/share/applications/* "$out"/share/applications/ 62 + mkdir -p "$out"/share/icons 63 + ln -s "$resources/images/c.png" "$out"/share/icons/cura.png 64 + ''; 65 + 66 + meta = with stdenv.lib; { 67 + description = "3D printing host software"; 68 + homepage = https://github.com/daid/Cura; 69 + license = licenses.agpl3; 70 + platforms = platforms.linux; 71 + maintainers = with stdenv.lib.maintainers; [ the-kenny ]; 72 + }; 73 + }
+15 -18
pkgs/applications/misc/curaengine/default.nix
··· 1 - { stdenv, fetchurl }: 2 - let 3 - version = "15.04.6"; 4 - in 5 - stdenv.mkDerivation { 1 + { stdenv, fetchFromGitHub, cmake, libarcus }: 2 + 3 + stdenv.mkDerivation rec { 6 4 name = "curaengine-${version}"; 5 + version = "2.4.0"; 7 6 8 - src = fetchurl { 9 - url = "https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"; 10 - sha256 = "1cd4dikzvqyj5g80rqwymvh4nwm76vsf78clb37kj6q0fig3qbjg"; 7 + src = fetchFromGitHub { 8 + owner = "Ultimaker"; 9 + repo = "CuraEngine"; 10 + rev = version; 11 + sha256 = "1n587cqm310kzb2zbc31199x7ybgxzjq91hslb1zcb8qg8qqmixm"; 11 12 }; 12 13 13 - postPatch = '' 14 - sed -i 's,--static,,g' Makefile 15 - ''; 14 + nativeBuildInputs = [ cmake ]; 15 + buildInputs = [ libarcus ]; 16 16 17 - installPhase = '' 18 - mkdir -p $out/bin 19 - cp build/CuraEngine $out/bin/ 20 - ''; 17 + enableParallelBuilding = true; 21 18 22 19 meta = with stdenv.lib; { 23 - description = "Engine for processing 3D models into 3D printing instructions"; 24 - homepage = https://github.com/Ultimaker/CuraEngine; 20 + description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction"; 21 + homepage = "https://github.com/Ultimaker/CuraEngine"; 25 22 license = licenses.agpl3; 26 23 platforms = platforms.linux; 27 - maintainers = with stdenv.lib.maintainers; [ the-kenny ]; 24 + maintainers = with maintainers; [ abbradar ]; 28 25 }; 29 26 }
+29
pkgs/applications/misc/curaengine/stable.nix
··· 1 + { stdenv, fetchurl }: 2 + let 3 + version = "15.04.6"; 4 + in 5 + stdenv.mkDerivation { 6 + name = "curaengine-${version}"; 7 + 8 + src = fetchurl { 9 + url = "https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"; 10 + sha256 = "1cd4dikzvqyj5g80rqwymvh4nwm76vsf78clb37kj6q0fig3qbjg"; 11 + }; 12 + 13 + postPatch = '' 14 + sed -i 's,--static,,g' Makefile 15 + ''; 16 + 17 + installPhase = '' 18 + mkdir -p $out/bin 19 + cp build/CuraEngine $out/bin/ 20 + ''; 21 + 22 + meta = with stdenv.lib; { 23 + description = "Engine for processing 3D models into 3D printing instructions"; 24 + homepage = https://github.com/Ultimaker/CuraEngine; 25 + license = licenses.agpl3; 26 + platforms = platforms.linux; 27 + maintainers = with stdenv.lib.maintainers; [ the-kenny ]; 28 + }; 29 + }
+8 -2
pkgs/top-level/all-packages.nix
··· 15270 15270 15271 15271 slic3r = callPackage ../applications/misc/slic3r { }; 15272 15272 15273 - curaengine = callPackage ../applications/misc/curaengine { }; 15273 + curaengine_stable = callPackage ../applications/misc/curaengine/stable.nix { }; 15274 + cura_stable = callPackage ../applications/misc/cura/stable.nix { 15275 + curaengine = curaengine_stable; 15276 + }; 15274 15277 15275 - cura = callPackage ../applications/misc/cura { }; 15278 + curaengine = callPackage ../applications/misc/curaengine { 15279 + inherit (python3.pkgs) libarcus; 15280 + }; 15281 + cura = qt5.callPackage ../applications/misc/cura { }; 15276 15282 15277 15283 curaLulzbot = callPackage ../applications/misc/cura/lulzbot.nix { }; 15278 15284