Unverified Commit 946e69dd authored by Grimmauld's avatar Grimmauld Committed by GitHub
Browse files

freecad: dependencies cleanup (#451074)

parents 908d6f5c 69b15835
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -11,13 +11,13 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "coin";
  version = "4.0.5";
  version = "4.0.6";

  src = fetchFromGitHub {
    owner = "coin3d";
    repo = "coin";
    rev = "v${finalAttrs.version}";
    hash = "sha256-2lfy33Qx0AjKDfwwRn7hjaz7mPQsr7MRB9v75qshGjM=";
    hash = "sha256-XBkb8CbfAXBwOO9JkExpsy8HxtbZo3/fnU6cReuSETI=";
  };

  nativeBuildInputs = [ cmake ];
@@ -29,8 +29,6 @@ stdenv.mkDerivation (finalAttrs: {
  ]
  ++ lib.optional stdenv.hostPlatform.isLinux libX11;

  cmakeFlags = [ "-DCOIN_USE_CPACK=OFF" ];

  meta = with lib; {
    homepage = "https://github.com/coin3d/coin";
    description = "High-level, retained-mode toolkit for effective 3D graphics development";

pkgs/by-name/fr/freecad/README.md

deleted100644 → 0
+0 −7
Original line number Diff line number Diff line
This package supports the following parameters:

- withWayland (default: true): when false, set QT_QPA_PLATFORM to xcb
- spaceNavSupport (enabled by default on Linux): whether to enable
  [spacenavd support](https://spacenav.sourceforge.net/)
- ifcSupport (default: false): whether to enable ifc support through
  ifcopenshell
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
  buildEnv,
  makeWrapper,
  lib,
  python311,
  python,
  writeShellScript,
}:
let
@@ -36,7 +36,7 @@ let
    if builtins.isString pyt then
      pyt
    else if builtins.isFunction pyt then
      "${(python311.withPackages pyt)}/lib/python3.11/site-packages"
      "${(python.withPackages pyt)}/${python.sitePackages}"
    else
      throw "Expected string or function as python paths for freecad"
  );
+6 −27
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
  fetchFromGitHub,
  fetchpatch,
  fmt,
  gfortran,
  gts,
  hdf5,
  libGLU,
@@ -19,13 +18,11 @@
  ninja,
  ode,
  opencascade-occt,
  microsoft-gsl,
  pkg-config,
  python3Packages,
  spaceNavSupport ? stdenv.hostPlatform.isLinux,
  stdenv,
  swig,
  vtk,
  wrapGAppsHook3,
  xercesc,
  yaml-cpp,
  zlib,
@@ -50,9 +47,10 @@ let
    pyyaml # (at least for) PyrateWorkbench
    scipy
    shiboken6
    vtk
  ];

  freecad-utils = callPackage ./freecad-utils.nix { };
  freecad-utils = callPackage ./freecad-utils.nix { inherit (python3Packages) python; };
in
freecad-utils.makeCustomizable (
  stdenv.mkDerivation (finalAttrs: {
@@ -71,10 +69,8 @@ freecad-utils.makeCustomizable (
      cmake
      ninja
      pkg-config
      gfortran
      swig
      doxygen
      wrapGAppsHook3
      qt6.wrapQtAppsHook
    ];

@@ -86,21 +82,21 @@ freecad-utils.makeCustomizable (
      hdf5
      libGLU
      libXmu
      libspnav
      medfile
      ode
      vtk
      xercesc
      yaml-cpp
      zlib
      opencascade-occt
      microsoft-gsl
      qt6.qtbase
      qt6.qtsvg
      qt6.qttools
      qt6.qtwayland
      qt6.qtwebengine
    ]
    ++ pythonDeps
    ++ lib.optionals spaceNavSupport [ libspnav ];
    ++ pythonDeps;

    patches = [
      ./0001-NIXOS-don-t-ignore-PYTHONPATH.patch
@@ -133,24 +129,8 @@ freecad-utils.makeCustomizable (
      "-DFREECAD_USE_PYBIND11=ON"
      "-DBUILD_QT5=OFF"
      "-DBUILD_QT6=ON"
      "-DSHIBOKEN_INCLUDE_DIR=${python3Packages.shiboken6}/include"
      "-DSHIBOKEN_LIBRARY=Shiboken6::libshiboken"
      (
        "-DPYSIDE_INCLUDE_DIR=${python3Packages.pyside6}/include"
        + ";${python3Packages.pyside6}/include/PySide6/QtCore"
        + ";${python3Packages.pyside6}/include/PySide6/QtWidgets"
        + ";${python3Packages.pyside6}/include/PySide6/QtGui"
      )
      "-DPYSIDE_LIBRARY=PySide6::pyside6"
    ];

    # This should work on both x86_64, and i686 linux
    preBuild = ''
      export NIX_LDFLAGS="-L${gfortran.cc.lib}/lib64 -L${gfortran.cc.lib}/lib $NIX_LDFLAGS";
    '';

    dontWrapGApps = true;

    qtWrapperArgs =
      let
        binPath = lib.makeBinPath [
@@ -162,7 +142,6 @@ freecad-utils.makeCustomizable (
        "--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1"
        "--prefix PATH : ${binPath}"
        "--prefix PYTHONPATH : ${python3Packages.makePythonPath pythonDeps}"
        "\${gappsWrapperArgs[@]}"
      ];

    postFixup = ''