about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/curaengine/stable.nix
blob: 148553da16212b06aee2fc25ce4d5b6387df671c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv, fetchurl }:
let
  version = "15.04.6";
in
stdenv.mkDerivation {
  pname = "curaengine";
  inherit version;

  src = fetchurl {
    url = "https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz";
    sha256 = "1cd4dikzvqyj5g80rqwymvh4nwm76vsf78clb37kj6q0fig3qbjg";
  };

  postPatch = ''
    substituteInPlace Makefile --replace "--static" ""
  '' + lib.optionalString stdenv.isi686 ''
    substituteInPlace Makefile --replace "-flto" ""
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp build/CuraEngine $out/bin/
  '';

  meta = with lib; {
    description = "Engine for processing 3D models into 3D printing instructions";
    homepage = "https://github.com/Ultimaker/CuraEngine";
    license = licenses.agpl3;
    platforms = platforms.linux;
  };
}