From f2fd1381c5ec3a8d75c771433bb12672cff852c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Sat, 7 Sep 2019 10:01:06 +0200 Subject: [PATCH 1/3] cereal: init at 1.2.2 --- pkgs/development/libraries/cereal/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/libraries/cereal/default.nix diff --git a/pkgs/development/libraries/cereal/default.nix b/pkgs/development/libraries/cereal/default.nix new file mode 100644 index 000000000000..7802be9c4f00 --- /dev/null +++ b/pkgs/development/libraries/cereal/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, cmake }: +stdenv.mkDerivation rec { + pname = "cereal"; + version = "1.2.2"; + + nativeBuildInputs = [ cmake ]; + + src = fetchFromGitHub { + owner = "USCiLab"; + repo = "cereal"; + rev = "v${version}"; + sha256 = "1ckr8r03ggg5pyzg8yw40d5ssq40h5najvyqlnxc85fxxp8rnrx4"; + }; + + cmakeFlagsArray = [ "-DJUST_INSTALL_CEREAL=yes" ]; + + meta = with stdenv.lib; { + description = "A header-only C++11 serialization library"; + homepage = https://uscilab.github.io/cereal/; + platforms = platforms.all; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4b95d340af84..f247b76149d7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -153,6 +153,8 @@ in castxml = callPackage ../development/tools/castxml { }; + cereal = callPackage ../development/libraries/cereal { }; + clj-kondo = callPackage ../development/tools/clj-kondo { }; cmark = callPackage ../development/libraries/cmark { }; From 5c95ab00ce2e2307465374a745ae26f68a205a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Mon, 23 Sep 2019 19:33:04 +0200 Subject: [PATCH 2/3] prusa-slicer: 2.0.0 -> 2.1.0 --- pkgs/applications/misc/prusa-slicer/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index a795c4485160..f1920637ba25 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, makeWrapper, cmake, pkgconfig -, boost, curl, expat, glew, libpng, tbb, wxGTK30 +, boost, cereal, curl, expat, glew, libpng, tbb, wxGTK30 , gtest, nlopt, xorg, makeDesktopItem }: let @@ -9,7 +9,7 @@ let in stdenv.mkDerivation rec { pname = "prusa-slicer"; - version = "2.0.0"; + version = "2.1.0"; enableParallelBuilding = true; @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { # nixpkgs. buildInputs = [ boost + cereal curl expat glew @@ -42,8 +43,8 @@ stdenv.mkDerivation rec { prePatch = '' # In nix ioctls.h isn't available from the standard kernel-headers package - # on other distributions. As the copy in glibc seems to be identical to the - # one in the kernel, we use that one instead. + # 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"||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 @@ -54,7 +55,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "prusa3d"; repo = "PrusaSlicer"; - sha256 = "135wn2sza2f2kvbja1haxil5kx1b74lc1i7dsa35i1y3phabykhz"; + sha256 = "172nz01iiqfjzkpcbl78j6almq6av70l71jgrzrcdw6ham1wqnpr"; rev = "version_${version}"; }; From dda8e474731947e333c9b95fe80e2c5c1d354c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Mon, 23 Sep 2019 19:33:20 +0200 Subject: [PATCH 3/3] prusa-slicer: add Eigen as dependency Previously compilation failed when using our version of Eigen. Now it works again. --- pkgs/applications/misc/prusa-slicer/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index f1920637ba25..f3cd6fdb0f62 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, makeWrapper, cmake, pkgconfig -, boost, cereal, curl, expat, glew, libpng, tbb, wxGTK30 +, boost, cereal, curl, eigen, expat, glew, libpng, tbb, wxGTK30 , gtest, nlopt, xorg, makeDesktopItem }: let @@ -19,12 +19,11 @@ stdenv.mkDerivation rec { pkgconfig ]; - # We could add Eigen, but it doesn't currently compile with the version in - # nixpkgs. buildInputs = [ boost cereal curl + eigen expat glew libpng @@ -41,6 +40,11 @@ stdenv.mkDerivation rec { # We need to set the path via the NLOPT environment variable instead. NLOPT = nlopt; + # 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"; + 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