2016-04-17 01:33:19 +02:00
|
|
|
{ stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }:
|
2012-01-03 22:14:14 +01:00
|
|
|
|
2015-10-21 14:43:52 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-03-31 04:28:01 +02:00
|
|
|
version = "2.0.9";
|
2015-10-21 14:43:52 +02:00
|
|
|
name = "librecad-${version}";
|
2012-01-03 22:14:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-10-21 14:43:52 +02:00
|
|
|
url = "https://github.com/LibreCAD/LibreCAD/tarball/${version}";
|
|
|
|
name = name + ".tar.gz";
|
2016-03-31 04:28:01 +02:00
|
|
|
sha256 = "0npr2nxwmx1qil7lqhkh6yvkw7dwym0nfashxjglxspjallqjya7";
|
2012-01-03 22:14:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e s,/bin/bash,`type -P bash`, scripts/postprocess-unix.sh
|
2015-10-21 14:43:52 +02:00
|
|
|
sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
|
2012-01-03 22:14:14 +01:00
|
|
|
'';
|
|
|
|
|
2016-04-17 01:33:19 +02:00
|
|
|
qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ];
|
2012-01-03 22:14:14 +01:00
|
|
|
|
2012-11-28 11:25:08 +01:00
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/bin $out/share
|
2012-11-28 11:25:08 +01:00
|
|
|
cp -R unix/librecad $out/bin
|
|
|
|
cp -R unix/resources $out/share/librecad
|
|
|
|
'';
|
2012-01-03 22:14:14 +01:00
|
|
|
|
2015-10-21 14:43:52 +02:00
|
|
|
buildInputs = [ qt4 muparser which boost ];
|
2016-04-17 01:33:19 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig qmake4Hook ];
|
2015-10-21 14:43:52 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2012-01-03 22:14:14 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 2D CAD package based upon Qt";
|
|
|
|
homepage = http://librecad.org;
|
2015-10-21 14:43:52 +02:00
|
|
|
repositories.git = git://github.com/LibreCAD/LibreCAD.git;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2012-11-28 11:25:08 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2012-01-03 22:14:14 +01:00
|
|
|
};
|
|
|
|
}
|