summary refs log tree commit diff
path: root/pkgs/applications/graphics/leocad/default.nix
blob: 9ca9c592102803253bb9f0893516516bd3b2f9f6 (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
/*
To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
*/

{ stdenv, fetchsvn, qt4, zlib }:

stdenv.mkDerivation rec {
  name = "leocad-${version}";
  version = "0.81";

  src = fetchsvn {
    url = "http://svn.leocad.org/tags/${name}";
    sha256 = "1190gb437ls51hhfiwa79fq131026kywpy3j3k4fkdgfr8a9v3q8";
  };

  buildInputs = [ qt4 zlib ];

  prefixKey = "INSTALL_PREFIX=";
  configureScript = "qmake leocad.pro";
  postPatch = ''
    substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
  '';

  meta = with stdenv.lib; {
    description = "CAD program for creating virtual LEGO models";
    homepage = http://www.leocad.org/;
    license = licenses.gpl2;
    inherit (qt4.meta) platforms;
  };
}