freecad: use qt wrapper

This commit is contained in:
Gabriel Ebner 2019-08-09 13:39:10 +02:00
parent 6446e7e7ac
commit 439ce61c51
2 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, ninja, coin3d, xercesc, ode, eigen, qt5, opencascade-occt, gts
{ stdenv, mkDerivation, fetchurl, cmake, ninja, coin3d, xercesc, ode, eigen, qt5, opencascade-occt, gts
, hdf5, vtk, medfile, zlib, python3Packages, swig, gfortran, libXmu
, soqt, libf2c, libGLU, makeWrapper, pkgconfig
, mpi ? null }:
@ -7,7 +7,7 @@ assert mpi != null;
let
pythonPackages = python3Packages;
in stdenv.mkDerivation rec {
in mkDerivation rec {
name = "freecad-${version}";
version = "0.18.3";
@ -46,12 +46,13 @@ in stdenv.mkDerivation rec {
# Their main() removes PYTHONPATH=, and we rely on it.
preConfigure = ''
sed '/putenv("PYTHONPATH/d' -i src/Main/MainGui.cpp
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
'';
postInstall = ''
wrapProgram $out/bin/FreeCAD --prefix PYTHONPATH : $PYTHONPATH \
--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1
'';
qtWrapperArgs = [
"--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1"
];
postFixup = ''
mv $out/share/doc $out
@ -59,9 +60,9 @@ in stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
homepage = https://www.freecadweb.org/;
homepage = "https://www.freecadweb.org/";
license = licenses.lgpl2Plus;
maintainers = [ maintainers.viric ];
maintainers = with maintainers; [ viric gebner ];
platforms = platforms.linux;
};
}

View File

@ -18344,7 +18344,7 @@ in
fractal = callPackage ../applications/networking/instant-messengers/fractal { };
freecad = callPackage ../applications/graphics/freecad { mpi = openmpi; };
freecad = qt5.callPackage ../applications/graphics/freecad { mpi = openmpi; };
freemind = callPackage ../applications/misc/freemind { };