> > > Many thanks!
> > > Unfortunately, the build does not work and has stopped after a few
> > > minutes.
> > > See attached the build log.
> > > Christophe
> >
> > I'll try to compile it again... I wasn't expecting the package to fail. LOL
> > I'll keep you posted, thanks for the log!
>
> Eh, I just built it successfully, and it starts (0.19).
>
> I'll follow a couple of tutorials and see how it performs.
I supposed I had an old system so I `guix pulled` and it
doesn't compile anymore. Looks like we've changed the order of
the libraries and now it fails.
I re-made the package, but now it doesn't compile with some
weird compilation error related with C++ stuff. I can't really
believe what I see.
Please, try to guix pull and build it again.
I attach what I have right now, I had to add some deps on top of
what I sent before and it doesn't work :S
This is crazy :D
(define-module (freecad)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system qt)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
#:use-module (gnu packages engineering)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages geo)
#:use-module (gnu packages gl)
#:use-module (gnu packages graphics)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages image)
#:use-module (gnu packages image-processing)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages swig)
#:use-module (gnu packages tbb)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
(package
(name "freecad-mine")
(version "0.19.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/FreeCAD/FreeCAD")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0c53q2iawy4yfp11czyc7lbr9ivp3r7v24x4c20myh11wyplffc0"))))
(build-system qt-build-system)
(native-inputs
`(("doxygen" ,doxygen)
("graphviz" ,graphviz)
("qttools" ,qttools)
("pkg-config" ,pkg-config)
("python-pyside-2-tools" ,python-pyside-2-tools)
("swig" ,swig)))
(inputs
`(("boost" ,boost)
("coin3D" ,coin3D)
("double-conversion" ,double-conversion)
("eigen" ,eigen)
("freetype" ,freetype)
("gl2ps" ,gl2ps)
("glew" ,glew)
("hdf5" ,hdf5-1.10)
("jsoncpp" ,jsoncpp)
("libarea" ,libarea)
("libjpeg-turbo" ,libjpeg-turbo)
("libmedfile" ,libmedfile)
("libspnav" ,libspnav)
("libtheora" ,libtheora)
("libtiff" ,libtiff)
("libxi" ,libxi)
("libxmlplusplus" ,libxmlplusplus)
("libxmu" ,libxmu)
("lz4" ,lz4)
("netcdf" ,netcdf)
("opencascade-occt" ,opencascade-occt)
("openmpi" ,openmpi)
("proj" ,proj)
("python-gitpython" ,python-gitpython)
("python-matplotlib" ,python-matplotlib)
("python-pivy" ,python-pivy)
("python-pyside-2" ,python-pyside-2)
("python-pyyaml" ,python-pyyaml)
("python-shiboken-2" ,python-shiboken-2)
("python-wrapper" ,python-wrapper)
("qtbase" ,qtbase)
("qtsvg" ,qtsvg)
("qtwebkit" ,qtwebkit)
("qtx11extras" ,qtx11extras)
("qtxmlpatterns" ,qtxmlpatterns)
("sqlite" ,sqlite)
("tbb" ,tbb)
("vtk" ,vtk)
("xerces-c" ,xerces-c)
("zlib" ,zlib)))
(arguments
`(#:tests? #f
#:configure-flags
(list
"-DBUILD_QT5=ON"
"-DBUILD_FLAT_MESH:BOOL=ON"
(string-append "-DCMAKE_INSTALL_LIBDIR=" (assoc-ref %outputs "out") "/lib")
(string-append "-DPYSIDE2UICBINARY="
(assoc-ref %build-inputs "python-pyside-2-tools")
"/bin/uic")
(string-append "-DPYSIDE2RCCBINARY="
(assoc-ref %build-inputs "python-pyside-2-tools")
"/bin/rcc")
"-DPYSIDE_LIBRARY=PySide2::pyside2"
(string-append
"-DPYSIDE_INCLUDE_DIR="
(assoc-ref %build-inputs "python-pyside-2") "/include;"
(assoc-ref %build-inputs "python-pyside-2") "/include/PySide2;"
(assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtCore;"
(assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtWidgets;"
(assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtGui;")
"-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
(string-append "-DSHIBOKEN_INCLUDE_DIR="
(assoc-ref %build-inputs "python-shiboken-2")
"/include/shiboken2"))
#:phases
(modify-phases %standard-phases
(add-before 'configure 'restore-pythonpath
(lambda _
(substitute* "src/Main/MainGui.cpp"
(("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
#t))
(add-after 'install 'wrap-pythonpath
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/FreeCAD")
(list "PYTHONPATH"
'prefix (list (getenv "PYTHONPATH")))))
#t)))))
(home-page "https://www.freecadweb.org/")
(synopsis "Your Own 3D Parametric Modeler")
(description
"FreeCAD is a general purpose feature-based, parametric 3D modeler for
CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
product design but also fits a wider range of uses in engineering, such as
architecture or other engineering specialties. It is 100% Open Source (LGPL2+
license) and extremely modular, allowing for very advanced extension and
customization.")
(license
(list
license:lgpl2.1+
license:lgpl2.0+
license:gpl3+
license:bsd-3)))