From 405ca157da947271c97b1d057b55f07a7d99d27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Fri, 15 Jan 2021 19:42:12 +0100 Subject: [PATCH] prusa-slicer: 2.2.0 -> 2.3.0 --- .../misc/prusa-slicer/default.nix | 56 +++++++++++++------ .../misc/prusa-slicer/super-slicer.nix | 22 ++++---- 2 files changed, 49 insertions(+), 29 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"; diff --git a/pkgs/applications/misc/prusa-slicer/super-slicer.nix b/pkgs/applications/misc/prusa-slicer/super-slicer.nix index eed3bfc9c31..14894159843 100644 --- a/pkgs/applications/misc/prusa-slicer/super-slicer.nix +++ b/pkgs/applications/misc/prusa-slicer/super-slicer.nix @@ -24,19 +24,19 @@ let postInstall = '' mkdir -p "$out/share/pixmaps/" ln -s "$out/share/SuperSlicer/icons/Slic3r.png" "$out/share/pixmaps/${appname}.png" - mkdir -p "$out/share/applications" - cp "$desktopItem"/share/applications/* "$out/share/applications/" ''; - desktopItem = makeDesktopItem { - name = appname; - exec = "superslicer"; - icon = appname; - comment = description; - desktopName = appname; - genericName = "3D printer tool"; - categories = "Development;"; - }; + desktopItems = [ + (makeDesktopItem { + name = appname; + exec = "superslicer"; + icon = appname; + comment = description; + desktopName = appname; + genericName = "3D printer tool"; + categories = "Development;"; + }) + ]; meta = with lib; { inherit description;