diff --git a/pkgs/applications/misc/curaengine/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot/curaengine.nix similarity index 90% rename from pkgs/applications/misc/curaengine/lulzbot.nix rename to pkgs/applications/misc/cura/lulzbot/curaengine.nix index 0df3e19b3183..e44f43d22bfe 100644 --- a/pkgs/applications/misc/curaengine/lulzbot.nix +++ b/pkgs/applications/misc/cura/lulzbot/curaengine.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, fetchpatch, cmake, libarcusLulzbot, stb, protobuf }: +{ stdenv, callPackage, fetchgit, fetchpatch, cmake, libarcusLulzbot, stb, protobuf }: stdenv.mkDerivation rec { name = "curaengine-lulzBot-${version}"; diff --git a/pkgs/applications/misc/cura/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot/default.nix similarity index 69% rename from pkgs/applications/misc/cura/lulzbot.nix rename to pkgs/applications/misc/cura/lulzbot/default.nix index 9073c5fae49f..2d32d1895f9b 100644 --- a/pkgs/applications/misc/cura/lulzbot.nix +++ b/pkgs/applications/misc/cura/lulzbot/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchgit, curaengineLulzbot, cmake, jq, python3Packages, qtbase, qtquickcontrols2 }: +{ lib, callPackage, fetchgit, cmake, jq, python3Packages, qtbase, qtquickcontrols2 }: let # admittedly, we're using (printer firmware) blobs when we could compile them ourselves. @@ -8,10 +8,22 @@ let rev = "cdc046494bbfe1f65bfb34659a257eef9a0100a0"; sha256 = "0v0s036gxdjiglas2yzw95alv60sw3pq5k1zrrhmw9mxr4irrblb"; }; - curaengine = curaengineLulzbot; - libarcus = python3Packages.libarcusLulzbot; - uranium = python3Packages.uraniumLulzbot; - libsavitar = python3Packages.libsavitarLulzbot; + + libarcusLulzbot = callPackage ./libarcus.nix { + inherit (python3Packages) buildPythonPackage sip pythonOlder; + }; + libsavitarLulzbot = callPackage ./libsavitar.nix { + inherit (python3Packages) buildPythonPackage sip pythonOlder; + }; + + inherit (python3Packages) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder; + curaengine = callPackage ./curaengine.nix { + inherit libarcusLulzbot; + }; + uraniumLulzbot = callPackage ./uranium.nix { + inherit callPackage libarcusLulzbot; + inherit (python3Packages) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder; + }; in python3Packages.buildPythonApplication rec { name = "cura-lulzbot-${version}"; @@ -26,11 +38,11 @@ python3Packages.buildPythonApplication rec { format = "other"; # using cmake to build buildInputs = [ qtbase qtquickcontrols2 ]; # numpy-stl temporarily disabled due to https://code.alephobjects.com/T8415 - propagatedBuildInputs = with python3Packages; [ pyserial requests zeroconf ] ++ [ libsavitar uranium libarcus ]; # numpy-stl + propagatedBuildInputs = with python3Packages; [ pyserial requests zeroconf ] ++ [ libsavitarLulzbot uraniumLulzbot libarcusLulzbot ]; # numpy-stl nativeBuildInputs = [ cmake python3Packages.wrapPython ]; cmakeFlags = [ - "-DURANIUM_DIR=${uranium.src}" + "-DURANIUM_DIR=${uraniumLulzbot.src}" "-DCURA_VERSION=${version}" ]; @@ -42,16 +54,16 @@ python3Packages.buildPythonApplication rec { preFixup = '' substituteInPlace "$out/bin/cura-lulzbot" --replace 'import cura.CuraApplication' 'import Savitar; import cura.CuraApplication' ln -sT "${curaBinaryData}/cura/resources/firmware" "$out/share/cura/resources/firmware" - ln -sT "${uranium}/share/uranium" "$out/share/uranium" + ln -sT "${uraniumLulzbot}/share/uranium" "$out/share/uranium" ${jq}/bin/jq --arg out "$out" '.build=$out' >"$out/version.json" <<'EOF' ${builtins.toJSON { cura = version; cura_version = version; binarydata = curaBinaryDataVersion; engine = curaengine.version; - libarcus = libarcus.version; - libsavitar = libsavitar.version; - uranium = uranium.version; + libarcus = libarcusLulzbot.version; + libsavitar = libsavitarLulzbot.version; + uranium = uraniumLulzbot.version; }} EOF ''; diff --git a/pkgs/development/python-modules/libarcus/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot/libarcus.nix similarity index 100% rename from pkgs/development/python-modules/libarcus/lulzbot.nix rename to pkgs/applications/misc/cura/lulzbot/libarcus.nix diff --git a/pkgs/development/python-modules/libsavitar/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot/libsavitar.nix similarity index 100% rename from pkgs/development/python-modules/libsavitar/lulzbot.nix rename to pkgs/applications/misc/cura/lulzbot/libsavitar.nix diff --git a/pkgs/development/python-modules/uranium/qt512-support.patch b/pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patch similarity index 100% rename from pkgs/development/python-modules/uranium/qt512-support.patch rename to pkgs/applications/misc/cura/lulzbot/uranium-qt512-support.patch diff --git a/pkgs/development/python-modules/uranium/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot/uranium.nix similarity index 91% rename from pkgs/development/python-modules/uranium/lulzbot.nix rename to pkgs/applications/misc/cura/lulzbot/uranium.nix index fd95110fd195..43869a0edc62 100644 --- a/pkgs/development/python-modules/uranium/lulzbot.nix +++ b/pkgs/applications/misc/cura/lulzbot/uranium.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchgit, buildPythonPackage, fetchFromGitHub, python, cmake +{ stdenv, callPackage, fetchurl, fetchgit, buildPythonPackage, fetchFromGitHub, python, cmake , pyqt5, numpy, scipy, shapely, libarcusLulzbot, doxygen, gettext, pythonOlder }: buildPythonPackage rec { @@ -20,7 +20,7 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake doxygen ]; # Qt 5.12+ support; see https://code.alephobjects.com/rU70b73ba0a270799b9eacf78e400aa8b8ab3fb2ee - patches = [ ./qt512-support.patch ]; + patches = [ ./uranium-qt512-support.patch ]; postPatch = '' sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8e28a4dd65f8..247914152b2d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20204,13 +20204,12 @@ in }; curaengine = callPackage ../applications/misc/curaengine { inherit (python3.pkgs) libarcus; }; - curaengineLulzbot = callPackage ../applications/misc/curaengine/lulzbot.nix { inherit (python3.pkgs) libarcusLulzbot; }; cura = qt5.callPackage ../applications/misc/cura { }; curaPlugins = callPackage ../applications/misc/cura/plugins.nix { }; - curaLulzbot = qt5.callPackage ../applications/misc/cura/lulzbot.nix { }; + curaLulzbot = qt5.callPackage ../applications/misc/cura/lulzbot/default.nix { }; curaByDagoma = callPackage ../applications/misc/curabydagoma { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 62586866c261..e957fe5746c5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3238,7 +3238,6 @@ in { fs-s3fs = callPackage ../development/python-modules/fs-s3fs { }; libarcus = callPackage ../development/python-modules/libarcus { inherit (pkgs) protobuf; }; - libarcusLulzbot = callPackage ../development/python-modules/libarcus/lulzbot.nix { inherit (pkgs) protobuf; }; libcloud = callPackage ../development/python-modules/libcloud { }; @@ -3259,7 +3258,6 @@ in { }; libsavitar = callPackage ../development/python-modules/libsavitar { }; - libsavitarLulzbot = callPackage ../development/python-modules/libsavitar/lulzbot.nix { }; libplist = disabledIf isPy3k (toPythonModule (pkgs.libplist.override{python2Packages=self; })).py; @@ -5539,7 +5537,6 @@ in { twilio = callPackage ../development/python-modules/twilio { }; uranium = callPackage ../development/python-modules/uranium { }; - uraniumLulzbot = callPackage ../development/python-modules/uranium/lulzbot.nix { }; uuid = callPackage ../development/python-modules/uuid { };