mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 11:05:14 +00:00
cura, curaengine: 14.04 -> 2.4.0
Move old Cura to {cura,curaengine}_stable
This commit is contained in:
parent
868794010f
commit
2e80b50a7e
@ -7,7 +7,7 @@ let
|
||||
cfg = config.services.octoprint;
|
||||
|
||||
baseConfig = {
|
||||
plugins.cura.cura_engine = "${pkgs.curaengine}/bin/CuraEngine";
|
||||
plugins.cura.cura_engine = "${pkgs.curaengine_stable}/bin/CuraEngine";
|
||||
server.host = cfg.host;
|
||||
server.port = cfg.port;
|
||||
webcam.ffmpeg = "${pkgs.ffmpeg.bin}/bin/ffmpeg";
|
||||
|
@ -1,73 +1,38 @@
|
||||
{ stdenv, python27Packages, curaengine, makeDesktopItem, fetchurl }:
|
||||
let
|
||||
py = python27Packages;
|
||||
version = "15.04";
|
||||
in
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, python3, qtbase, makeQtWrapper, curaengine }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cura-${version}";
|
||||
version = "2.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/daid/Cura/archive/${version}.tar.gz";
|
||||
sha256 = "0xbjvzhp8wzq9lnpmcg1fjf7j5h39bj5463sd5c8jzdjl96izizl";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Ultimaker";
|
||||
repo = "Cura";
|
||||
rev = version;
|
||||
sha256 = "04iglmjg9rzmlfrll6g7bcckkla327938xh8qmbdfrh215aivdlp";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "Cura";
|
||||
exec = "cura";
|
||||
icon = "cura";
|
||||
comment = "Cura";
|
||||
desktopName = "Cura";
|
||||
genericName = "3D printing host software";
|
||||
categories = "GNOME;GTK;Utility;";
|
||||
};
|
||||
buildInputs = [ qtbase ];
|
||||
propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial ];
|
||||
nativeBuildInputs = [ cmake python3.pkgs.wrapPython makeQtWrapper ];
|
||||
|
||||
python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
|
||||
cmakeFlags = [ "-DCMAKE_MODULE_PATH=${python3.pkgs.uranium}/share/cmake-${cmake.majorVersion}/Modules" ];
|
||||
|
||||
pythonPath = python_deps;
|
||||
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
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = python_deps;
|
||||
|
||||
buildInputs = [ curaengine py.wrapPython ];
|
||||
|
||||
configurePhase = "";
|
||||
buildPhase = "";
|
||||
|
||||
patches = [ ./numpy-cast.patch ];
|
||||
|
||||
installPhase = ''
|
||||
# Install Python code.
|
||||
site_packages=$out/lib/python2.7/site-packages
|
||||
mkdir -p $site_packages
|
||||
cp -r Cura $site_packages/
|
||||
|
||||
# Install resources.
|
||||
resources=$out/share/cura
|
||||
mkdir -p $resources
|
||||
cp -r resources/* $resources/
|
||||
sed -i 's|os.path.join(os.path.dirname(__file__), "../../resources")|"'$resources'"|g' $site_packages/Cura/util/resources.py
|
||||
|
||||
# Install executable.
|
||||
mkdir -p $out/bin
|
||||
cp Cura/cura.py $out/bin/cura
|
||||
chmod +x $out/bin/cura
|
||||
sed -i 's|#!/usr/bin/python|#!/usr/bin/env python|' $out/bin/cura
|
||||
postFixup = ''
|
||||
wrapPythonPrograms
|
||||
|
||||
# Make it find CuraEngine.
|
||||
echo "def getEngineFilename(): return '${curaengine}/bin/CuraEngine'" >> $site_packages/Cura/util/sliceEngine.py
|
||||
|
||||
# Install desktop item.
|
||||
mkdir -p "$out"/share/applications
|
||||
cp "$desktopItem"/share/applications/* "$out"/share/applications/
|
||||
mkdir -p "$out"/share/icons
|
||||
ln -s "$resources/images/c.png" "$out"/share/icons/cura.png
|
||||
mv $out/bin/cura $out/bin/.cura-noqtpath
|
||||
makeQtWrapper $out/bin/.cura-noqtpath $out/bin/cura
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "3D printing host software";
|
||||
homepage = https://github.com/daid/Cura;
|
||||
description = "3D printer / slicing GUI built on top of the Uranium framework";
|
||||
homepage = "https://github.com/Ultimaker/Cura";
|
||||
license = licenses.agpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
|
73
pkgs/applications/misc/cura/stable.nix
Normal file
73
pkgs/applications/misc/cura/stable.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ stdenv, python27Packages, curaengine, makeDesktopItem, fetchurl }:
|
||||
let
|
||||
py = python27Packages;
|
||||
version = "15.04";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cura-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/daid/Cura/archive/${version}.tar.gz";
|
||||
sha256 = "0xbjvzhp8wzq9lnpmcg1fjf7j5h39bj5463sd5c8jzdjl96izizl";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "Cura";
|
||||
exec = "cura";
|
||||
icon = "cura";
|
||||
comment = "Cura";
|
||||
desktopName = "Cura";
|
||||
genericName = "3D printing host software";
|
||||
categories = "GNOME;GTK;Utility;";
|
||||
};
|
||||
|
||||
python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
|
||||
|
||||
pythonPath = python_deps;
|
||||
|
||||
propagatedBuildInputs = python_deps;
|
||||
|
||||
buildInputs = [ curaengine py.wrapPython ];
|
||||
|
||||
configurePhase = "";
|
||||
buildPhase = "";
|
||||
|
||||
patches = [ ./numpy-cast.patch ];
|
||||
|
||||
installPhase = ''
|
||||
# Install Python code.
|
||||
site_packages=$out/lib/python2.7/site-packages
|
||||
mkdir -p $site_packages
|
||||
cp -r Cura $site_packages/
|
||||
|
||||
# Install resources.
|
||||
resources=$out/share/cura
|
||||
mkdir -p $resources
|
||||
cp -r resources/* $resources/
|
||||
sed -i 's|os.path.join(os.path.dirname(__file__), "../../resources")|"'$resources'"|g' $site_packages/Cura/util/resources.py
|
||||
|
||||
# Install executable.
|
||||
mkdir -p $out/bin
|
||||
cp Cura/cura.py $out/bin/cura
|
||||
chmod +x $out/bin/cura
|
||||
sed -i 's|#!/usr/bin/python|#!/usr/bin/env python|' $out/bin/cura
|
||||
wrapPythonPrograms
|
||||
|
||||
# Make it find CuraEngine.
|
||||
echo "def getEngineFilename(): return '${curaengine}/bin/CuraEngine'" >> $site_packages/Cura/util/sliceEngine.py
|
||||
|
||||
# Install desktop item.
|
||||
mkdir -p "$out"/share/applications
|
||||
cp "$desktopItem"/share/applications/* "$out"/share/applications/
|
||||
mkdir -p "$out"/share/icons
|
||||
ln -s "$resources/images/c.png" "$out"/share/icons/cura.png
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "3D printing host software";
|
||||
homepage = https://github.com/daid/Cura;
|
||||
license = licenses.agpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
};
|
||||
}
|
@ -1,29 +1,26 @@
|
||||
{ stdenv, fetchurl }:
|
||||
let
|
||||
version = "15.04.6";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "curaengine-${version}";
|
||||
{ stdenv, fetchFromGitHub, cmake, libarcus }:
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz";
|
||||
sha256 = "1cd4dikzvqyj5g80rqwymvh4nwm76vsf78clb37kj6q0fig3qbjg";
|
||||
stdenv.mkDerivation rec {
|
||||
name = "curaengine-${version}";
|
||||
version = "2.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Ultimaker";
|
||||
repo = "CuraEngine";
|
||||
rev = version;
|
||||
sha256 = "1n587cqm310kzb2zbc31199x7ybgxzjq91hslb1zcb8qg8qqmixm";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's,--static,,g' Makefile
|
||||
'';
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libarcus ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp build/CuraEngine $out/bin/
|
||||
'';
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Engine for processing 3D models into 3D printing instructions";
|
||||
homepage = https://github.com/Ultimaker/CuraEngine;
|
||||
description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction";
|
||||
homepage = "https://github.com/Ultimaker/CuraEngine";
|
||||
license = licenses.agpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
|
29
pkgs/applications/misc/curaengine/stable.nix
Normal file
29
pkgs/applications/misc/curaengine/stable.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, fetchurl }:
|
||||
let
|
||||
version = "15.04.6";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "curaengine-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz";
|
||||
sha256 = "1cd4dikzvqyj5g80rqwymvh4nwm76vsf78clb37kj6q0fig3qbjg";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's,--static,,g' Makefile
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp build/CuraEngine $out/bin/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Engine for processing 3D models into 3D printing instructions";
|
||||
homepage = https://github.com/Ultimaker/CuraEngine;
|
||||
license = licenses.agpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
};
|
||||
}
|
@ -15270,9 +15270,15 @@ with pkgs;
|
||||
|
||||
slic3r = callPackage ../applications/misc/slic3r { };
|
||||
|
||||
curaengine = callPackage ../applications/misc/curaengine { };
|
||||
curaengine_stable = callPackage ../applications/misc/curaengine/stable.nix { };
|
||||
cura_stable = callPackage ../applications/misc/cura/stable.nix {
|
||||
curaengine = curaengine_stable;
|
||||
};
|
||||
|
||||
cura = callPackage ../applications/misc/cura { };
|
||||
curaengine = callPackage ../applications/misc/curaengine {
|
||||
inherit (python3.pkgs) libarcus;
|
||||
};
|
||||
cura = qt5.callPackage ../applications/misc/cura { };
|
||||
|
||||
curaLulzbot = callPackage ../applications/misc/cura/lulzbot.nix { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user