2021-01-11 07:54:33 +00:00
|
|
|
{ lib
|
|
|
|
, boost
|
2020-01-08 22:56:46 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2022-01-01 14:14:22 +00:00
|
|
|
, mkDerivation
|
2020-01-08 22:56:46 +00:00
|
|
|
, muparser
|
2021-01-17 02:09:27 +00:00
|
|
|
, pkg-config
|
2020-01-08 22:56:46 +00:00
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, runtimeShell
|
|
|
|
}:
|
|
|
|
|
2022-01-01 14:14:22 +00:00
|
|
|
mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "librecad";
|
2023-01-03 05:20:31 +00:00
|
|
|
version = "2.2.0";
|
2012-01-03 21:14:14 +00:00
|
|
|
|
2019-09-19 03:42:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LibreCAD";
|
|
|
|
repo = "LibreCAD";
|
|
|
|
rev = version;
|
2023-01-03 05:20:31 +00:00
|
|
|
sha256 = "sha256-horKTegmvcMg4m5NbZ4nzy4J6Ac/6+E5OkiZl0v6TBc=";
|
2012-01-03 21:14:14 +00:00
|
|
|
};
|
|
|
|
|
2023-01-03 05:20:31 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
muparser
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pkg-config
|
|
|
|
qmake
|
|
|
|
qttools
|
|
|
|
];
|
|
|
|
|
|
|
|
qmakeFlags = [
|
|
|
|
"MUPARSER_DIR=${muparser}"
|
|
|
|
"BOOST_DIR=${boost.dev}"
|
2022-01-30 09:56:31 +00:00
|
|
|
];
|
|
|
|
|
2019-09-19 03:42:23 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace scripts/postprocess-unix.sh \
|
|
|
|
--replace /bin/sh ${runtimeShell}
|
|
|
|
|
|
|
|
substituteInPlace librecad/src/main/qc_applicationwindow.cpp \
|
|
|
|
--replace __DATE__ 0
|
2012-01-03 21:14:14 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
2012-11-28 10:25:08 +00:00
|
|
|
installPhase = ''
|
2019-09-19 03:42:23 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm555 -t $out/bin unix/{librecad,ttf2lff}
|
|
|
|
install -Dm444 -t $out/share/applications desktop/librecad.desktop
|
|
|
|
install -Dm644 -t $out/share/pixmaps librecad/res/main/librecad.png
|
|
|
|
install -Dm444 desktop/librecad.sharedmimeinfo $out/share/mime/packages/librecad.xml
|
|
|
|
install -Dm444 desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
|
2019-04-22 07:44:07 +00:00
|
|
|
$out/share/icons/hicolor/scalable/apps/librecad.svg
|
2019-09-19 03:42:23 +00:00
|
|
|
|
|
|
|
installManPage desktop/librecad.?
|
|
|
|
|
2012-11-28 10:25:08 +00:00
|
|
|
cp -R unix/resources $out/share/librecad
|
2019-09-19 03:42:23 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2012-11-28 10:25:08 +00:00
|
|
|
'';
|
2012-01-03 21:14:14 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-19 03:42:23 +00:00
|
|
|
description = "2D CAD package based on Qt";
|
|
|
|
homepage = "https://librecad.org";
|
2021-03-18 21:13:52 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ kiwi viric ];
|
2019-09-19 03:42:23 +00:00
|
|
|
platforms = platforms.linux;
|
2012-01-03 21:14:14 +00:00
|
|
|
};
|
|
|
|
}
|