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

View File

@ -18344,7 +18344,7 @@ in
fractal = callPackage ../applications/networking/instant-messengers/fractal { }; 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 { }; freemind = callPackage ../applications/misc/freemind { };