2015-01-23 05:39:39 +00:00
|
|
|
/*
|
|
|
|
To use aditional parts libraries
|
|
|
|
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
|
|
|
|
*/
|
|
|
|
|
2016-04-17 00:29:11 +01:00
|
|
|
{ stdenv, fetchsvn, qt4, qmake4Hook, zlib }:
|
2015-01-23 05:39:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "leocad-${version}";
|
|
|
|
version = "0.81";
|
|
|
|
|
|
|
|
src = fetchsvn {
|
|
|
|
url = "http://svn.leocad.org/tags/${name}";
|
|
|
|
sha256 = "1190gb437ls51hhfiwa79fq131026kywpy3j3k4fkdgfr8a9v3q8";
|
|
|
|
};
|
|
|
|
|
2016-04-17 00:29:11 +01:00
|
|
|
buildInputs = [ qt4 qmake4Hook zlib ];
|
2015-01-23 05:39:39 +00:00
|
|
|
|
2016-03-26 13:56:06 +00:00
|
|
|
postPatch = ''
|
2016-06-19 09:18:30 +01:00
|
|
|
sed '1i#include <cmath>' -i common/camera.cpp
|
2016-03-26 13:56:06 +00:00
|
|
|
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
|
2016-04-17 00:29:11 +01:00
|
|
|
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
|
2016-03-26 13:56:06 +00:00
|
|
|
'';
|
2015-01-23 05:39:39 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "CAD program for creating virtual LEGO models";
|
|
|
|
homepage = http://www.leocad.org/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
inherit (qt4.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|