3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/graphics/leocad/default.nix

34 lines
891 B
Nix
Raw Normal View History

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/
*/
2017-03-19 00:32:30 +00:00
{ stdenv, fetchFromGitHub, qt4, qmake4Hook, zlib }:
2015-01-23 05:39:39 +00:00
stdenv.mkDerivation rec {
name = "leocad-${version}";
2017-03-19 00:32:30 +00:00
version = "17.02";
2015-01-23 05:39:39 +00:00
2017-03-19 00:32:30 +00:00
src = fetchFromGitHub {
owner = "leozide";
repo = "leocad";
rev = "v${version}";
sha256 = "0d7l2il6r4swnmrmaf1bsrgpjgai5xwhwk2mkpcsddnk59790mmc";
2015-01-23 05:39:39 +00:00
};
2017-03-19 00:32:30 +00:00
nativeBuildInputs = [ qmake4Hook ];
buildInputs = [ qt4 zlib ];
postPatch = ''
sed '1i#include <cmath>' -i common/camera.cpp
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
2016-04-17 00:29:11 +01:00
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
2017-03-19 00:32:30 +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;
};
}