summary refs log tree commit diff
path: root/pkgs/applications/misc/cura
diff options
context:
space:
mode:
authorCharles Duffy <charles@dyfis.net>2019-09-25 23:13:19 -0500
committerCharles Duffy <charles@dyfis.net>2019-09-25 23:13:19 -0500
commitde36bdc26949053bedea5e92280834b8bb775ce8 (patch)
tree4a941cd4832a028f12bc2170ae32fb587dce6328 /pkgs/applications/misc/cura
parentff4e645739990d7ee13109ce802b672f0f3850d0 (diff)
downloadnixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.tar
nixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.tar.gz
nixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.tar.bz2
nixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.tar.lz
nixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.tar.xz
nixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.tar.zst
nixpkgs-de36bdc26949053bedea5e92280834b8bb775ce8.zip
curaLulzbot: Adopt fixes from mainline cura package
Diffstat (limited to 'pkgs/applications/misc/cura')
-rw-r--r--pkgs/applications/misc/cura/lulzbot/default.nix24
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/applications/misc/cura/lulzbot/default.nix b/pkgs/applications/misc/cura/lulzbot/default.nix
index 81ce949823d..072c9e475a7 100644
--- a/pkgs/applications/misc/cura/lulzbot/default.nix
+++ b/pkgs/applications/misc/cura/lulzbot/default.nix
@@ -1,4 +1,4 @@
-{ lib, callPackage, fetchgit, cmake, jq, python3Packages, qtbase, qtquickcontrols2 }:
+{ lib, mkDerivation, wrapQtAppsHook, callPackage, fetchgit, cmake, jq, python3, qtbase, qtquickcontrols2 }:
 
 let
   # admittedly, we're using (printer firmware) blobs when we could compile them ourselves.
@@ -10,23 +10,23 @@ let
   };
 
   libarcusLulzbot = callPackage ./libarcus.nix {
-    inherit (python3Packages) buildPythonPackage sip pythonOlder;
+    inherit (python3.pkgs) buildPythonPackage sip pythonOlder;
   };
   libsavitarLulzbot = callPackage ./libsavitar.nix {
-    inherit (python3Packages) buildPythonPackage sip pythonOlder;
+    inherit (python3.pkgs) buildPythonPackage sip pythonOlder;
   };
 
-  inherit (python3Packages) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
+  inherit (python3.pkgs) 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;
+    inherit (python3.pkgs) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
   };
 in
-python3Packages.buildPythonApplication rec {
-  name = "cura-lulzbot-${version}";
+mkDerivation rec {
+  pname = "cura-lulzbot";
   version = "3.6.20";
 
   src = fetchgit {
@@ -35,11 +35,10 @@ python3Packages.buildPythonApplication rec {
     sha256 = "1xkqf89anxmy2aw0vr604ln7qsibacgk9l2g8jlf467hja8f0dzq";
   };
 
-  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 ] ++ [ libsavitarLulzbot uraniumLulzbot libarcusLulzbot ]; # numpy-stl
-  nativeBuildInputs = [ cmake python3Packages.wrapPython ];
+  propagatedBuildInputs = with python3.pkgs; [ pyserial requests zeroconf ] ++ [ libsavitarLulzbot uraniumLulzbot libarcusLulzbot ]; # numpy-stl
+  nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
 
   cmakeFlags = [
     "-DURANIUM_DIR=${uraniumLulzbot.src}"
@@ -68,6 +67,11 @@ python3Packages.buildPythonApplication rec {
     EOF
   '';
 
+  postFixup = ''
+    wrapPythonPrograms
+    wrapQtApp "$out/bin/cura-lulzbot"
+  '';
+
   meta = with lib; {
     description = "3D printer / slicing GUI built on top of the Uranium framework";
     homepage = https://code.alephobjects.com/diffusion/CURA/;