Merge pull request #153074 from prusnak/qcad-update

qcad: 3.26.4.10 -> 3.27.1.0
This commit is contained in:
Pavol Rusnak 2022-01-01 20:31:30 +01:00 committed by GitHub
commit 4e471b1c6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,28 +1,30 @@
{ boost
, fetchFromGitHub
, libGLU
{ lib
, stdenv
, mkDerivation
, muparser
, fetchFromGitHub
, installShellFiles
, pkg-config
, qtbase
, qmake
, qttools
, boost
, libGLU
, muparser
, qtbase
, qtscript
, qtsvg
, qtxmlpatterns
, qttools
, lib
, installShellFiles
, qtmacextras
}:
mkDerivation rec {
pname = "qcad";
version = "3.26.4.10";
version = "3.27.1.0";
src = fetchFromGitHub {
owner = "qcad";
repo = "qcad";
rev = "v${version}";
sha256 = "sha256-dWpItV18lYjdwUsn2wwA//AUHU5ICGfmih2cJWihvn0=";
sha256 = "sha256-tydgSfS1MF322sgWULMEZ8P6YIaN1QoeJiia0wbsgjo=";
};
patches = [
@ -39,26 +41,56 @@ mkDerivation rec {
fi
'';
nativeBuildInputs = [
installShellFiles
pkg-config
qmake
qttools
];
buildInputs = [
boost
libGLU
muparser
qtbase
qtscript
qtsvg
qtxmlpatterns
] ++ lib.optionals stdenv.isDarwin [
qtmacextras
];
qmakeFlags = [
"MUPARSER_DIR=${muparser}"
"INSTALLROOT=$(out)"
"BOOST_DIR=${boost.dev}"
];
qtWrapperArgs =
lib.optionals stdenv.isLinux [ "--prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib" ]
++
lib.optionals stdenv.isDarwin [ "--prefix DYLD_LIBRARY_PATH : ${placeholder "out"}/lib" ];
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin release/qcad-bin
install -Dm555 -t $out/lib release/libspatialindexnavel.so
install -Dm555 -t $out/lib release/libqcadcore.so
install -Dm555 -t $out/lib release/libqcadentity.so
install -Dm555 -t $out/lib release/libqcadgrid.so
install -Dm555 -t $out/lib release/libqcadsnap.so
install -Dm555 -t $out/lib release/libqcadoperations.so
install -Dm555 -t $out/lib release/libqcadstemmer.so
install -Dm555 -t $out/lib release/libqcadspatialindex.so
install -Dm555 -t $out/lib release/libqcadgui.so
install -Dm555 -t $out/lib release/libqcadecmaapi.so
'' + lib.optionalString stdenv.isLinux ''
install -Dm555 release/qcad-bin $out/bin/qcad
'' + lib.optionalString stdenv.isDarwin ''
install -Dm555 release/QCAD.app/Contents/MacOS/QCAD $out/bin/qcad
mkdir -p $out/lib
'' +
''
install -Dm555 -t $out/lib release/libspatialindexnavel${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadcore${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadentity${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadgrid${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadsnap${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadoperations${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadstemmer${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadspatialindex${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadgui${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm555 -t $out/lib release/libqcadecmaapi${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm444 -t $out/share/applications qcad.desktop
install -Dm644 -t $out/share/pixmaps scripts/qcad_icon.png
@ -88,23 +120,6 @@ mkDerivation rec {
runHook postInstall
'';
buildInputs = [
boost
muparser
libGLU
qtbase
qtscript
qtsvg
qtxmlpatterns
];
nativeBuildInputs = [
pkg-config
qmake
qttools
installShellFiles
];
meta = with lib; {
description = "2D CAD package based on Qt";
homepage = "https://qcad.org";