librecad: 2.2.0-rc2 -> 2.2.0

This commit is contained in:
Austin Butler 2023-01-02 21:20:31 -08:00
parent 789db3cfd5
commit 57e6253b8c

View file

@ -1,7 +1,6 @@
{ lib { lib
, boost , boost
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, installShellFiles , installShellFiles
, mkDerivation , mkDerivation
, muparser , muparser
@ -15,38 +14,42 @@
mkDerivation rec { mkDerivation rec {
pname = "librecad"; pname = "librecad";
version = "2.2.0-rc2"; version = "2.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "LibreCAD"; owner = "LibreCAD";
repo = "LibreCAD"; repo = "LibreCAD";
rev = version; rev = version;
sha256 = "sha256-RNg7ioMriH4A7V65+4mh8NhsUHs/8IbTt38nVkYilCE="; sha256 = "sha256-horKTegmvcMg4m5NbZ4nzy4J6Ac/6+E5OkiZl0v6TBc=";
}; };
patches = [ buildInputs = [
(fetchpatch { boost
url = "https://github.com/LibreCAD/LibreCAD/pull/1465/commits/4edcbe72679f95cb60979c77a348c1522a20b0f4.patch"; muparser
sha256 = "sha256-P0G2O5sL7Ip860ByxFQ87TfV/lq06wCQnzPxADGqFPs="; qtbase
name = "CVE-2021-45342.patch"; qtsvg
}) ];
nativeBuildInputs = [
installShellFiles
pkg-config
qmake
qttools
];
qmakeFlags = [
"MUPARSER_DIR=${muparser}"
"BOOST_DIR=${boost.dev}"
]; ];
postPatch = '' postPatch = ''
substituteInPlace scripts/postprocess-unix.sh \ substituteInPlace scripts/postprocess-unix.sh \
--replace /bin/sh ${runtimeShell} --replace /bin/sh ${runtimeShell}
substituteInPlace librecad/src/lib/engine/rs_system.cpp \
--replace /usr/share $out/share
substituteInPlace librecad/src/main/qc_applicationwindow.cpp \ substituteInPlace librecad/src/main/qc_applicationwindow.cpp \
--replace __DATE__ 0 --replace __DATE__ 0
''; '';
qmakeFlags = [
"MUPARSER_DIR=${muparser}"
"BOOST_DIR=${boost.dev}"
];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -65,20 +68,6 @@ mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
buildInputs = [
boost
muparser
qtbase
qtsvg
];
nativeBuildInputs = [
installShellFiles
pkg-config
qmake
qttools
];
meta = with lib; { meta = with lib; {
description = "2D CAD package based on Qt"; description = "2D CAD package based on Qt";
homepage = "https://librecad.org"; homepage = "https://librecad.org";