2013-04-28 12:59:00 +02:00
|
|
|
{ stdenv, fetchgit, perl, makeWrapper, makeDesktopItem
|
2014-08-20 16:27:47 +02:00
|
|
|
, which, perlPackages
|
2014-01-02 17:53:57 +01:00
|
|
|
}:
|
2013-04-28 12:59:00 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-10-22 14:11:59 +02:00
|
|
|
version = "1.2.9";
|
2013-04-28 12:59:00 +02:00
|
|
|
name = "slic3r-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/alexrj/Slic3r";
|
|
|
|
rev = "refs/tags/${version}";
|
2016-06-02 13:26:44 +02:00
|
|
|
sha256 = "1z8h11k29b7z49z5k8ikyfiijyycy1q3krlzi8hfd0vdybvymw21";
|
2013-04-28 12:59:00 +02:00
|
|
|
};
|
|
|
|
|
2017-09-04 22:01:04 +02:00
|
|
|
patches = [
|
|
|
|
./gcc6.patch
|
|
|
|
];
|
|
|
|
|
2014-08-20 16:27:47 +02:00
|
|
|
buildInputs = with perlPackages; [ perl makeWrapper which
|
2015-04-06 16:22:31 +02:00
|
|
|
EncodeLocale MathClipper ExtUtilsXSpp threads
|
2013-04-28 12:59:00 +02:00
|
|
|
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
2014-08-20 16:27:47 +02:00
|
|
|
IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
|
2016-07-18 20:58:58 +02:00
|
|
|
ExtUtilsMakeMaker OpenGL WxGLCanvas ModuleBuild LWP
|
2018-06-10 22:19:40 +02:00
|
|
|
ExtUtilsCppGuess ModuleBuildWithXSpp ExtUtilsTypemapsDefault
|
2013-04-28 12:59:00 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "slic3r";
|
|
|
|
exec = "slic3r";
|
|
|
|
icon = "slic3r";
|
|
|
|
comment = "G-code generator for 3D printers";
|
|
|
|
desktopName = "Slic3r";
|
|
|
|
genericName = "3D printer tool";
|
|
|
|
categories = "Application;Development;";
|
|
|
|
};
|
|
|
|
|
2014-08-20 16:27:47 +02:00
|
|
|
buildPhase = ''
|
|
|
|
export SLIC3R_NO_AUTO=true
|
2017-09-04 22:01:04 +02:00
|
|
|
export LD=$CXX
|
2014-08-20 16:27:47 +02:00
|
|
|
export PERL5LIB="./xs/blib/arch/:./xs/blib/lib:$PERL5LIB"
|
|
|
|
|
2014-11-15 19:22:18 +01:00
|
|
|
substituteInPlace Build.PL \
|
|
|
|
--replace "0.9918" "0.9923" \
|
|
|
|
--replace "eval" ""
|
|
|
|
|
2014-08-20 16:27:47 +02:00
|
|
|
pushd xs
|
|
|
|
perl Build.PL
|
|
|
|
perl Build
|
|
|
|
popd
|
|
|
|
|
2014-11-15 19:22:18 +01:00
|
|
|
perl Build.PL --gui
|
2014-08-20 16:27:47 +02:00
|
|
|
'';
|
2013-04-28 12:59:00 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/share/slic3r/"
|
|
|
|
cp -r * "$out/share/slic3r/"
|
2014-08-20 16:27:47 +02:00
|
|
|
wrapProgram "$out/share/slic3r/slic3r.pl" \
|
|
|
|
--prefix PERL5LIB : "$out/share/slic3r/xs/blib/arch:$out/share/slic3r/xs/blib/lib:$PERL5LIB"
|
2013-04-28 12:59:00 +02:00
|
|
|
mkdir -p "$out/bin"
|
|
|
|
ln -s "$out/share/slic3r/slic3r.pl" "$out/bin/slic3r"
|
|
|
|
mkdir -p "$out/share/pixmaps/"
|
|
|
|
ln -s "$out/share/slic3r/var/Slic3r.png" "$out/share/pixmaps/slic3r.png"
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
cp "$desktopItem"/share/applications/* "$out/share/applications/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "G-code generator for 3D printers";
|
|
|
|
longDescription = ''
|
|
|
|
Slic3r is the tool you need to convert a digital 3D model into printing
|
|
|
|
instructions for your 3D printer. It cuts the model into horizontal
|
|
|
|
slices (layers), generates toolpaths to fill them and calculates the
|
|
|
|
amount of material to be extruded.'';
|
|
|
|
homepage = http://slic3r.org/;
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.linux;
|
2014-08-20 16:27:47 +02:00
|
|
|
maintainers = with maintainers; [ bjornfor the-kenny ];
|
2013-04-28 12:59:00 +02:00
|
|
|
};
|
|
|
|
}
|