summary refs log tree commit diff
path: root/pkgs/applications/misc/prusa-slicer/default.nix
diff options
context:
space:
mode:
authorAndré-Patrick Bubel <code@apb.name>2021-01-15 19:42:12 +0100
committerAndré-Patrick Bubel <code@apb.name>2021-01-17 16:52:41 +0100
commit405ca157da947271c97b1d057b55f07a7d99d27e (patch)
tree981a70b308ee8d589551b5dc7b4a1e0584c7a4e0 /pkgs/applications/misc/prusa-slicer/default.nix
parent47d121591c9688f2625f3fc3e2ddfd4d423a8cf6 (diff)
downloadnixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.tar
nixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.tar.gz
nixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.tar.bz2
nixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.tar.lz
nixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.tar.xz
nixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.tar.zst
nixpkgs-405ca157da947271c97b1d057b55f07a7d99d27e.zip
prusa-slicer: 2.2.0 -> 2.3.0
Diffstat (limited to 'pkgs/applications/misc/prusa-slicer/default.nix')
-rw-r--r--pkgs/applications/misc/prusa-slicer/default.nix56
1 files changed, 38 insertions, 18 deletions
diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix
index 7cd31adfa32..4d2ef2254e1 100644
--- a/pkgs/applications/misc/prusa-slicer/default.nix
+++ b/pkgs/applications/misc/prusa-slicer/default.nix
@@ -1,15 +1,16 @@
-{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
-, boost, cereal, curl, eigen, expat, glew, libpng, tbb, wxGTK31
-, gtest, nlopt, xorg, makeDesktopItem
-, cgal_5, gmp, ilmbase, mpfr, qhull, openvdb, systemd
+{ stdenv, lib, fetchFromGitHub, cmake, copyDesktopItems, makeDesktopItem, pkg-config, wrapGAppsHook
+, boost, cereal, cgal_5, curl, dbus, eigen, expat, glew, glib, gmp, gtest, gtk3, hicolor-icon-theme
+, ilmbase, libpng, mpfr, nlopt, openvdb, pcre, qhull, systemd, tbb, wxGTK31-gtk3, xorg
 }:
 stdenv.mkDerivation rec {
   pname = "prusa-slicer";
-  version = "2.2.0";
+  version = "2.3.0";
 
   nativeBuildInputs = [
     cmake
+    copyDesktopItems
     pkg-config
+    wrapGAppsHook
   ];
 
   buildInputs = [
@@ -17,21 +18,27 @@ stdenv.mkDerivation rec {
     cereal
     cgal_5
     curl
+    dbus
     eigen
     expat
     glew
+    glib
     gmp
+    gtk3
+    hicolor-icon-theme
     ilmbase
     libpng
     mpfr
     nlopt
     openvdb
+    pcre
     systemd
     tbb
-    wxGTK31
+    wxGTK31-gtk3
     xorg.libX11
   ] ++ checkInputs;
 
+  doCheck = true;
   checkInputs = [ gtest ];
 
   # The build system uses custom logic - defined in
@@ -62,30 +69,43 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "prusa3d";
     repo = "PrusaSlicer";
-    sha256 = "0954k9sm09y8qnz1jyswyysg10k54ywz8mswnwa4n2hnpq9qx73m";
+    sha256 = "08zyvik8cyj1n9knbg8saan7j8s60nzkyj4a77818zbi9lpi65i5";
     rev = "version_${version}";
   };
 
   cmakeFlags = [
     "-DSLIC3R_FHS=1"
+    "-DSLIC3R_GTK=3"
   ];
 
   postInstall = ''
+    ln -s "$out/bin/prusa-slicer" "$out/bin/prusa-gcodeviewer"
+
     mkdir -p "$out/share/pixmaps/"
     ln -s "$out/share/PrusaSlicer/icons/PrusaSlicer.png" "$out/share/pixmaps/PrusaSlicer.png"
-    mkdir -p "$out/share/applications"
-    cp "$desktopItem"/share/applications/* "$out/share/applications/"
+    ln -s "$out/share/PrusaSlicer/icons/PrusaSlicer-gcodeviewer_192px.png" "$out/share/pixmaps/PrusaSlicer-gcodeviewer.png"
   '';
 
-  desktopItem = makeDesktopItem {
-    name = "PrusaSlicer";
-    exec = "prusa-slicer";
-    icon = "PrusaSlicer";
-    comment = "G-code generator for 3D printers";
-    desktopName = "PrusaSlicer";
-    genericName = "3D printer tool";
-    categories = "Development;";
-  };
+  desktopItems = [
+    (makeDesktopItem {
+      name = "PrusaSlicer";
+      exec = "prusa-slicer";
+      icon = "PrusaSlicer";
+      comment = "G-code generator for 3D printers";
+      desktopName = "PrusaSlicer";
+      genericName = "3D printer tool";
+      categories = "Development;";
+    })
+    (makeDesktopItem {
+      name = "PrusaSlicer G-code Viewer";
+      exec = "prusa-gcodeviewer";
+      icon = "PrusaSlicer-gcodeviewer";
+      comment = "G-code viewer for 3D printers";
+      desktopName = "PrusaSlicer G-code Viewer";
+      genericName = "G-code Viewer";
+      categories = "Development;";
+    })
+  ];
 
   meta = with lib; {
     description = "G-code generator for 3D printer";