2017-05-17 21:26:11 +02:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, cmake, python3, qtbase, curaengine }:
|
2017-02-25 23:05:04 +01:00
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
mkDerivation rec {
|
2014-09-26 12:12:14 +02:00
|
|
|
name = "cura-${version}";
|
2017-02-25 23:05:04 +01:00
|
|
|
version = "2.4.0";
|
2014-03-25 23:17:17 +01:00
|
|
|
|
2017-02-25 23:05:04 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ultimaker";
|
|
|
|
repo = "Cura";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "04iglmjg9rzmlfrll6g7bcckkla327938xh8qmbdfrh215aivdlp";
|
2014-03-25 23:17:17 +01:00
|
|
|
};
|
|
|
|
|
2017-02-25 23:05:04 +01:00
|
|
|
buildInputs = [ qtbase ];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial ];
|
2017-05-17 21:26:11 +02:00
|
|
|
nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
|
2014-03-25 23:17:17 +01:00
|
|
|
|
2017-02-25 23:05:04 +01:00
|
|
|
cmakeFlags = [ "-DCMAKE_MODULE_PATH=${python3.pkgs.uranium}/share/cmake-${cmake.majorVersion}/Modules" ];
|
2014-03-25 23:17:17 +01:00
|
|
|
|
2017-02-25 23:05:04 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
|
|
|
|
sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
|
|
|
|
'';
|
2014-03-25 23:17:17 +01:00
|
|
|
|
2017-02-25 23:05:04 +01:00
|
|
|
postFixup = ''
|
2014-03-25 23:17:17 +01:00
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
meta = with lib; {
|
2017-02-25 23:05:04 +01:00
|
|
|
description = "3D printer / slicing GUI built on top of the Uranium framework";
|
|
|
|
homepage = "https://github.com/Ultimaker/Cura";
|
2014-03-25 23:17:17 +01:00
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.linux;
|
2017-02-25 23:05:04 +01:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2014-03-25 23:17:17 +01:00
|
|
|
};
|
|
|
|
}
|