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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.2 KiB
Nix
Raw Normal View History

2021-03-15 10:05:35 +00:00
{ lib
, mkDerivation
, fetchFromGitHub
, fetchurl
, povray
2021-03-15 10:05:35 +00:00
, qmake
, qttools
, 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 {
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 {
pname = "leocad";
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}";
sha256 = "1ifbxngkbmg6d8vv08amxbnfvlyjdwzykrjp98lbwvgb0b843ygq";
2015-01-23 05:39:39 +00:00
};
2021-03-15 10:05:35 +00:00
nativeBuildInputs = [ qmake qttools ];
buildInputs = [ zlib ];
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
meta = with lib; {
2015-01-23 05:39:39 +00:00
description = "CAD program for creating virtual LEGO models";
homepage = "https://www.leocad.org/";
2021-03-15 10:05:35 +00:00
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
2015-01-23 05:39:39 +00:00
};
}