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 11:05:35 +01:00
{ lib
, mkDerivation
, fetchFromGitHub
, fetchurl
, povray
2021-03-15 11:05:35 +01:00
, qmake
, qttools
, substituteAll
2021-03-15 11:05:35 +01:00
, zlib
}:
2015-01-23 06:39:39 +01:00
/*
To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
*/
2021-03-15 11:05:35 +01:00
let
parts = fetchurl {
url = "https://web.archive.org/web/20210705153544/https://www.ldraw.org/library/updates/complete.zip";
2021-03-15 11:05:35 +01:00
sha256 = "sha256-PW3XCbFwRaNkx4EgCnl2rXH7QgmpNgjTi17kZ5bladA=";
};
2015-01-23 06:39:39 +01:00
2021-03-15 11:05:35 +01:00
in
mkDerivation rec {
pname = "leocad";
version = "21.06";
2015-01-23 06:39:39 +01:00
2017-03-19 01:32:30 +01:00
src = fetchFromGitHub {
owner = "leozide";
repo = "leocad";
rev = "v${version}";
sha256 = "1ifbxngkbmg6d8vv08amxbnfvlyjdwzykrjp98lbwvgb0b843ygq";
2015-01-23 06:39:39 +01:00
};
2021-03-15 11:05:35 +01:00
nativeBuildInputs = [ qmake qttools ];
buildInputs = [ zlib ];
propagatedBuildInputs = [ povray ];
patches = [
(substituteAll {
src = ./povray.patch;
inherit povray;
})
];
2021-03-15 11:05:35 +01:00
qmakeFlags = [
"INSTALL_PREFIX=${placeholder "out"}"
"DISABLE_UPDATE_CHECK=1"
];
qtWrapperArgs = [
"--set-default LEOCAD_LIB ${parts}"
];
2015-01-23 06:39:39 +01:00
meta = with lib; {
2015-01-23 06:39:39 +01:00
description = "CAD program for creating virtual LEGO models";
homepage = "https://www.leocad.org/";
2021-03-15 11:05:35 +01:00
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
2015-01-23 06:39:39 +01:00
};
}