2016-04-17 00:33:19 +01:00
|
|
|
{ stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }:
|
2012-01-03 21:14:14 +00:00
|
|
|
|
2015-10-21 13:43:52 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-11-26 16:50:01 +00:00
|
|
|
version = "2.1.3";
|
2015-10-21 13:43:52 +01:00
|
|
|
name = "librecad-${version}";
|
2012-01-03 21:14:14 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-10-21 13:43:52 +01:00
|
|
|
url = "https://github.com/LibreCAD/LibreCAD/tarball/${version}";
|
|
|
|
name = name + ".tar.gz";
|
2016-11-26 16:50:01 +00:00
|
|
|
sha256 = "1czp8bja61hfav2m7184cq1np1n76w3w6vn0hlkp81hhz9zc62sx";
|
2012-01-03 21:14:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e s,/bin/bash,`type -P bash`, scripts/postprocess-unix.sh
|
2015-10-21 13:43:52 +01:00
|
|
|
sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
|
2012-01-03 21:14:14 +00:00
|
|
|
'';
|
|
|
|
|
2016-04-17 00:33:19 +01:00
|
|
|
qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ];
|
2012-01-03 21:14:14 +00:00
|
|
|
|
2012-11-28 10:25:08 +00:00
|
|
|
installPhase = ''
|
2019-04-22 08:44:07 +01:00
|
|
|
install -m 555 -D unix/librecad $out/bin/librecad
|
|
|
|
install -m 444 -D desktop/librecad.desktop $out/share/applications/librecad.desktop
|
|
|
|
install -m 444 -D desktop/librecad.sharedmimeinfo $out/share/mime/packages/librecad.xml
|
|
|
|
install -m 444 -D desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
|
|
|
|
$out/share/icons/hicolor/scalable/apps/librecad.svg
|
2012-11-28 10:25:08 +00:00
|
|
|
cp -R unix/resources $out/share/librecad
|
|
|
|
'';
|
2012-01-03 21:14:14 +00:00
|
|
|
|
2015-10-21 13:43:52 +01:00
|
|
|
buildInputs = [ qt4 muparser which boost ];
|
2016-04-17 00:33:19 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig qmake4Hook ];
|
2015-10-21 13:43:52 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2012-01-03 21:14:14 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 2D CAD package based upon Qt";
|
2018-06-23 12:34:55 +01:00
|
|
|
homepage = https://librecad.org;
|
2015-10-21 13:43:52 +01:00
|
|
|
repositories.git = git://github.com/LibreCAD/LibreCAD.git;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2012-11-28 10:25:08 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2012-01-03 21:14:14 +00:00
|
|
|
};
|
|
|
|
}
|