Skip to content
Permalink
Browse files

freecad cad

  • Loading branch information
peterhoeg committed Oct 5, 2017
1 parent aebdc89 commit da863f453aecee20dbb3f3b3937c62284e3064e7
Showing with 29 additions and 17 deletions.
  1. +29 −17 pkgs/applications/graphics/freecad/default.nix
@@ -1,24 +1,35 @@
{ stdenv, fetchurl, cmake, coin3d, xercesc, ode, eigen, qt4, opencascade, gts
, boost, zlib, python27Packages, swig, gfortran, soqt, libf2c, makeWrapper }:
{ stdenv, fetchFromGitHub, cmake, makeWrapper
, coin3d, xercesc, ode, eigen, opencascade, gts
, boost, zlib, python27Packages, swig, gfortran, soqt, libf2c
, qtbase, qtsvg }:

let
pythonPackages = python27Packages;
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "freecad-${version}";
version = "0.16.6712";

src = fetchurl {
url = "https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz";
sha256 = "14hs26gvv7gbg9misxq34v4nrds2sbxjhj4yyw5kq3zbvl517alp";
src = fetchFromGitHub {
owner = "FreeCAD";
repo = "FreeCAD";
rev = version;
sha256 = "0ra4vfq4rqi54gyjq6ipzyqbyzacvh4087y94qilz9v4mlmwa5l5";
};

buildInputs = with pythonPackages; [ cmake coin3d xercesc ode eigen qt4 opencascade gts boost
zlib python swig gfortran soqt libf2c makeWrapper matplotlib
pycollada pyside pysideShiboken pysideTools pivy
];
buildInputs = [
qtbase qtsvg
coin3d xercesc ode eigen opencascade gts boost
zlib swig gfortran soqt libf2c
] ++ (with python27Packages; [
python matplotlib pycollada pyside pysideShiboken pysideTools pivy
]);

nativeBuildInputs = [ cmake makeWrapper ];

enableParallelBuilding = true;

cmakeFlags = [
"-DBUILD_QT5=ON"
];

# This should work on both x86_64, and i686 linux
preBuild = ''
export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS";
@@ -30,15 +41,16 @@ in stdenv.mkDerivation rec {
'';

postInstall = ''
wrapProgram $out/bin/FreeCAD --prefix PYTHONPATH : $PYTHONPATH \
wrapProgram $out/bin/FreeCAD \
--prefix PYTHONPATH : $PYTHONPATH \
--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1
'';

meta = with stdenv.lib; {
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
homepage = https://www.freecadweb.org/;
license = licenses.lgpl2Plus;
maintainers = [ maintainers.viric ];
platforms = platforms.linux;
homepage = https://www.freecadweb.org/;
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ viric ];
platforms = platforms.linux;
};
}

0 comments on commit da863f4

Please sign in to comment.
You can’t perform that action at this time.