summary refs log tree commit diff
path: root/pkgs/applications/misc/prusa-slicer/default.nix
diff options
context:
space:
mode:
authorAndré-Patrick Bubel <code@andre-bubel.de>2020-03-31 15:00:49 +0200
committerAndré-Patrick Bubel <code@andre-bubel.de>2020-03-31 15:00:49 +0200
commitbbce57b1431f35964c82a12ae9890330f966648c (patch)
tree59182f3fef34c77d167d72663b9f1c1e63e7dd65 /pkgs/applications/misc/prusa-slicer/default.nix
parent7fedac34b1063091fff4cd8fceb747f9918286ac (diff)
downloadnixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.tar
nixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.tar.gz
nixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.tar.bz2
nixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.tar.lz
nixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.tar.xz
nixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.tar.zst
nixpkgs-bbce57b1431f35964c82a12ae9890330f966648c.zip
prusa-slicer: 2.1.1 -> 2.2.0
Adding myself (moredread) as maintainer. Several new dependencies and a bit of cleanup.
Diffstat (limited to 'pkgs/applications/misc/prusa-slicer/default.nix')
-rw-r--r--pkgs/applications/misc/prusa-slicer/default.nix37
1 files changed, 21 insertions, 16 deletions
diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix
index caf4f270a15..75183e20267 100644
--- a/pkgs/applications/misc/prusa-slicer/default.nix
+++ b/pkgs/applications/misc/prusa-slicer/default.nix
@@ -1,32 +1,34 @@
-{ stdenv, lib, fetchFromGitHub, makeWrapper, cmake, pkgconfig
+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
 , boost, cereal, curl, eigen, expat, glew, libpng, tbb, wxGTK31
 , gtest, nlopt, xorg, makeDesktopItem
+, cgal_5, gmp, ilmbase, mpfr, qhull, openvdb, systemd
 }:
-let
-  nloptVersion = if lib.hasAttr "version" nlopt
-                 then lib.getAttr "version" nlopt
-                 else "2.4";
-in
 stdenv.mkDerivation rec {
   pname = "prusa-slicer";
-  version = "2.1.1";
+  version = "2.2.0";
 
   enableParallelBuilding = true;
 
   nativeBuildInputs = [
     cmake
-    makeWrapper
     pkgconfig
   ];
 
   buildInputs = [
     boost
     cereal
+    cgal_5
     curl
     eigen
     expat
     glew
+    gmp
+    ilmbase
     libpng
+    mpfr
+    nlopt
+    openvdb
+    systemd
     tbb
     wxGTK31
     xorg.libX11
@@ -35,31 +37,34 @@ stdenv.mkDerivation rec {
   checkInputs = [ gtest ];
 
   # The build system uses custom logic - defined in
-  # xs/src/libnest2d/cmake_modules/FindNLopt.cmake in the package source -
-  # for finding the nlopt library, which doesn't pick up the package in the nix store.
-  # We need to set the path via the NLOPT environment variable instead.
+  # cmake/modules/FindNLopt.cmake in the package source - for finding the nlopt
+  # library, which doesn't pick up the package in the nix store.  We
+  # additionally need to set the path via the NLOPT environment variable.
   NLOPT = nlopt;
 
-  # Disable compiler warnings that clutter the build log
+  # Disable compiler warnings that clutter the build log.
   # It seems to be a known issue for Eigen:
   # http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
   NIX_CFLAGS_COMPILE = "-Wno-ignored-attributes";
 
+  # prusa-slicer uses dlopen on `libudev.so` at runtime
+  NIX_LDFLAGS = "-ludev";
+
   prePatch = ''
     # In nix ioctls.h isn't available from the standard kernel-headers package
     # like in other distributions. The copy in glibc seems to be identical to the
     # one in the kernel though, so we use that one instead.
     sed -i 's|"/usr/include/asm-generic/ioctls.h"|<asm-generic/ioctls.h>|g' src/libslic3r/GCodeSender.cpp
-  '' + lib.optionalString (lib.versionOlder "2.5" nloptVersion) ''
+
     # Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx
     # now seems to be integrated into the main lib.
-    sed -i 's|nlopt_cxx|nlopt|g' src/libnest2d/cmake_modules/FindNLopt.cmake
+    sed -i 's|nlopt_cxx|nlopt|g' cmake/modules/FindNLopt.cmake
   '';
 
   src = fetchFromGitHub {
     owner = "prusa3d";
     repo = "PrusaSlicer";
-    sha256 = "0i393nbc2salb4j5l2hvy03ng7hmf90d2xj653pw9bsikhj0r3jd";
+    sha256 = "0954k9sm09y8qnz1jyswyysg10k54ywz8mswnwa4n2hnpq9qx73m";
     rev = "version_${version}";
   };
 
@@ -88,6 +93,6 @@ stdenv.mkDerivation rec {
     description = "G-code generator for 3D printer";
     homepage = https://github.com/prusa3d/PrusaSlicer;
     license = licenses.agpl3;
-    maintainers = with maintainers; [ tweber ];
+    maintainers = with maintainers; [ moredread tweber ];
   };
 }