2018-02-06 11:50:37 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages,
|
2018-02-24 13:59:47 +01:00
|
|
|
boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, bash, libGLU,
|
2018-02-16 22:20:22 +01:00
|
|
|
glew, eigen }:
|
2018-02-06 11:50:37 +01:00
|
|
|
let
|
|
|
|
AlienWxWidgets = perlPackages.buildPerlPackage rec {
|
|
|
|
name = "Alien-wxWidgets-0.69";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://cpan/authors/id/M/MD/MDOOTSON/${name}.tar.gz";
|
|
|
|
sha256 = "075m880klf66pbcfk0la2nl60vd37jljizqndrklh5y4zvzdy1nr";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pkgconfig perlPackages.ModulePluggable perlPackages.ModuleBuild
|
|
|
|
gtk2 gtk3 wxGTK30
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Wx = perlPackages.Wx.overrideAttrs (oldAttrs: {
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
perlPackages.ExtUtilsXSpp
|
|
|
|
AlienWxWidgets
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
WxGLCanvas = perlPackages.buildPerlPackage rec {
|
|
|
|
name = "Wx-GLCanvas-0.09";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://cpan/authors/id/M/MB/MBARBON/${name}.tar.gz";
|
|
|
|
sha256 = "1q4gvj4gdx4l8k4mkgiix24p9mdfy1miv7abidf0my3gy2gw5lka";
|
|
|
|
};
|
2018-02-24 13:59:47 +01:00
|
|
|
propagatedBuildInputs = [ Wx perlPackages.OpenGL libGLU ];
|
2018-02-06 11:50:37 +01:00
|
|
|
doCheck = false;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "slic3r-prusa-edition-${version}";
|
2018-03-18 00:52:46 +01:00
|
|
|
version = "1.39.1";
|
2018-02-06 11:50:37 +01:00
|
|
|
|
2018-02-16 22:24:21 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-02-06 11:50:37 +01:00
|
|
|
buildInputs = [
|
|
|
|
cmake
|
|
|
|
perl
|
|
|
|
makeWrapper
|
2018-02-16 22:20:22 +01:00
|
|
|
eigen
|
|
|
|
glew
|
2018-02-06 11:50:37 +01:00
|
|
|
tbb
|
|
|
|
which
|
|
|
|
Wx
|
|
|
|
WxGLCanvas
|
|
|
|
] ++ (with perlPackages; [
|
|
|
|
boost
|
|
|
|
ClassXSAccessor
|
|
|
|
EncodeLocale
|
|
|
|
ExtUtilsMakeMaker
|
|
|
|
ExtUtilsXSpp
|
|
|
|
GrowlGNTP
|
|
|
|
ImportInto
|
|
|
|
IOStringy
|
|
|
|
locallib
|
|
|
|
LWP
|
|
|
|
MathClipper
|
|
|
|
MathConvexHullMonotoneChain
|
|
|
|
MathGeometryVoronoi
|
|
|
|
MathPlanePath
|
|
|
|
ModuleBuild
|
|
|
|
Moo
|
|
|
|
NetDBus
|
|
|
|
OpenGL
|
|
|
|
threads
|
|
|
|
XMLSAX
|
|
|
|
]);
|
|
|
|
|
2018-03-18 00:52:46 +01:00
|
|
|
prePatch = ''
|
|
|
|
sed -i 's|"/usr/include/asm-generic/ioctls.h"|<asm-generic/ioctls.h>|g' xs/src/libslic3r/GCodeSender.cpp
|
|
|
|
'';
|
|
|
|
|
2018-02-06 11:50:37 +01:00
|
|
|
postInstall = ''
|
|
|
|
echo 'postInstall'
|
|
|
|
wrapProgram "$out/bin/slic3r-prusa3d" \
|
|
|
|
--prefix PERL5LIB : "$out/lib/slic3r-prusa3d:$PERL5LIB"
|
|
|
|
|
|
|
|
# it seems we need to copy the icons...
|
|
|
|
mkdir -p $out/bin/var
|
|
|
|
cp ../resources/icons/* $out/bin/var/
|
|
|
|
cp -r ../resources $out/bin/
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "prusa3d";
|
|
|
|
repo = "Slic3r";
|
2018-03-18 00:52:46 +01:00
|
|
|
sha256 = "0frkjgzmiy788ijkcqz3baxcrncqmk9s2vcd99hb8p2q13cg51ff";
|
2018-02-06 11:50:37 +01:00
|
|
|
rev = "version_${version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "G-code generator for 3D printer";
|
|
|
|
homepage = https://github.com/prusa3d/Slic3r;
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ tweber ];
|
|
|
|
};
|
|
|
|
}
|