leocad: 19.07.1 -> 21.03

This commit is contained in:
Peter Hoeg 2021-03-15 18:05:35 +08:00
parent b9a840e8ce
commit fc14612d12
2 changed files with 33 additions and 11 deletions

View File

@ -1,31 +1,53 @@
{ lib
, mkDerivation
, fetchFromGitHub
, fetchurl
, qmake
, qttools
, zlib
}:
/*
To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
*/
{ lib, stdenv, fetchFromGitHub, qt4, qmake4Hook, zlib }:
let
parts = fetchurl {
url = "https://web.archive.org/web/20190715142541/https://www.ldraw.org/library/updates/complete.zip";
sha256 = "sha256-PW3XCbFwRaNkx4EgCnl2rXH7QgmpNgjTi17kZ5bladA=";
};
stdenv.mkDerivation rec {
in
mkDerivation rec {
pname = "leocad";
version = "19.07.1";
version = "21.03";
src = fetchFromGitHub {
owner = "leozide";
repo = "leocad";
rev = "v${version}";
sha256 = "02kv1m18g6s4dady9jv4sjivfkrp192bmdw2a3d9lzlp60zks0p2";
sha256 = "sha256-69Ocfk5dBXwcRqAZWEP9Xg41o/tAQo76dIOk9oYhCUE=";
};
nativeBuildInputs = [ qmake4Hook ];
buildInputs = [ qt4 zlib ];
postPatch = ''
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
'';
nativeBuildInputs = [ qmake qttools ];
buildInputs = [ zlib ];
qmakeFlags = [
"INSTALL_PREFIX=${placeholder "out"}"
"DISABLE_UPDATE_CHECK=1"
];
qtWrapperArgs = [
"--set-default LEOCAD_LIB ${parts}"
];
meta = with lib; {
description = "CAD program for creating virtual LEGO models";
homepage = "https://www.leocad.org/";
license = licenses.gpl2;
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
}

View File

@ -5709,7 +5709,7 @@ in
lego = callPackage ../tools/admin/lego { };
leocad = callPackage ../applications/graphics/leocad { };
leocad = libsForQt5.callPackage ../applications/graphics/leocad { };
less = callPackage ../tools/misc/less { };