2021-03-15 10:05:35 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
2021-10-05 23:17:17 +01:00
|
|
|
, povray
|
2021-03-15 10:05:35 +00:00
|
|
|
, qmake
|
|
|
|
, qttools
|
2021-10-05 23:17:17 +01:00
|
|
|
, substituteAll
|
2021-03-15 10:05:35 +00:00
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
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/
|
|
|
|
*/
|
|
|
|
|
2021-03-15 10:05:35 +00:00
|
|
|
let
|
|
|
|
parts = fetchurl {
|
2021-10-04 21:14:25 +01:00
|
|
|
url = "https://web.archive.org/web/20210705153544/https://www.ldraw.org/library/updates/complete.zip";
|
2021-03-15 10:05:35 +00:00
|
|
|
sha256 = "sha256-PW3XCbFwRaNkx4EgCnl2rXH7QgmpNgjTi17kZ5bladA=";
|
|
|
|
};
|
2015-01-23 05:39:39 +00:00
|
|
|
|
2021-03-15 10:05:35 +00:00
|
|
|
in
|
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "leocad";
|
2021-10-04 21:14:25 +01:00
|
|
|
version = "21.06";
|
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}";
|
2021-10-04 21:14:25 +01:00
|
|
|
sha256 = "1ifbxngkbmg6d8vv08amxbnfvlyjdwzykrjp98lbwvgb0b843ygq";
|
2015-01-23 05:39:39 +00:00
|
|
|
};
|
|
|
|
|
2021-03-15 10:05:35 +00:00
|
|
|
nativeBuildInputs = [ qmake qttools ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2021-10-05 23:17:17 +01:00
|
|
|
propagatedBuildInputs = [ povray ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./povray.patch;
|
|
|
|
inherit povray;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-15 10:05:35 +00:00
|
|
|
qmakeFlags = [
|
|
|
|
"INSTALL_PREFIX=${placeholder "out"}"
|
|
|
|
"DISABLE_UPDATE_CHECK=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
qtWrapperArgs = [
|
|
|
|
"--set-default LEOCAD_LIB ${parts}"
|
|
|
|
];
|
2015-01-23 05:39:39 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-01-23 05:39:39 +00:00
|
|
|
description = "CAD program for creating virtual LEGO models";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.leocad.org/";
|
2021-03-15 10:05:35 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2017-12-30 01:02:04 +00:00
|
|
|
platforms = platforms.linux;
|
2015-01-23 05:39:39 +00:00
|
|
|
};
|
|
|
|
}
|