2014-02-13 17:13:29 +00:00
|
|
|
{ stdenv, fetchurl, qt4, muparser, which, boost, pkgconfig }:
|
2012-12-10 08:47:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2015-04-18 06:49:15 +01:00
|
|
|
name = "librecad-2.0.7";
|
2012-12-10 08:47:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-04-18 06:49:15 +01:00
|
|
|
url = https://github.com/LibreCAD/LibreCAD/tarball/2.0.7;
|
|
|
|
name = "librecad-2.0.7.tar.gz";
|
|
|
|
sha256 = "0r6d7fk9jl8368rbxzk9rwv0mciw28hlv77z29jf36amc42n6z4d";
|
2012-12-10 08:47:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e s,/bin/bash,`type -P bash`, scripts/postprocess-unix.sh
|
|
|
|
sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
2014-10-11 09:51:47 +01:00
|
|
|
qmake librecad.pro PREFIX=$out MUPARSER_DIR=${muparser} BOOST_DIR=${boost.dev}
|
2012-12-10 08:47:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out/bin $out/share
|
2012-12-10 08:47:55 +00:00
|
|
|
cp -R unix/librecad $out/bin
|
|
|
|
cp -R unix/resources $out/share/librecad
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ qt4 muparser which boost ];
|
2014-02-13 17:13:29 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2012-12-10 08:47:55 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 2D CAD package based upon Qt";
|
|
|
|
homepage = http://librecad.org;
|
2014-02-13 17:13:29 +00:00
|
|
|
repositories.git = git://github.com/LibreCAD/LibreCAD.git;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2012-12-10 08:47:55 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|