freecad: remove qt5 and explicit wayland builds (#416741)
This commit is contained in:
@@ -13,14 +13,12 @@
|
||||
hdf5,
|
||||
libGLU,
|
||||
libredwg,
|
||||
libsForQt5,
|
||||
libspnav,
|
||||
libXmu,
|
||||
medfile,
|
||||
mpi,
|
||||
ninja,
|
||||
ode,
|
||||
opencascade-occt_7_6,
|
||||
opencascade-occt,
|
||||
pkg-config,
|
||||
python3Packages,
|
||||
@@ -33,33 +31,32 @@
|
||||
xercesc,
|
||||
yaml-cpp,
|
||||
zlib,
|
||||
withWayland ? false,
|
||||
qtVersion ? 5,
|
||||
qt5,
|
||||
qt6,
|
||||
nix-update-script,
|
||||
}:
|
||||
let
|
||||
inherit (python3Packages)
|
||||
boost
|
||||
gitpython
|
||||
ifcopenshell
|
||||
matplotlib
|
||||
opencamlib
|
||||
pivy
|
||||
ply
|
||||
py-slvs
|
||||
pybind11
|
||||
pycollada
|
||||
pyside2
|
||||
pyside2-tools
|
||||
pyside6
|
||||
python
|
||||
pyyaml
|
||||
scipy
|
||||
shiboken2
|
||||
shiboken6
|
||||
;
|
||||
pythonDeps =
|
||||
with python3Packages;
|
||||
[
|
||||
boost
|
||||
gitpython # for addon manager
|
||||
matplotlib
|
||||
opencamlib
|
||||
pivy
|
||||
ply # for openSCAD file support
|
||||
py-slvs
|
||||
pybind11
|
||||
pycollada
|
||||
pyside6
|
||||
python
|
||||
pyyaml # (at least for) PyrateWorkbench
|
||||
scipy
|
||||
shiboken6
|
||||
]
|
||||
++ lib.optionals ifcSupport [
|
||||
ifcopenshell
|
||||
];
|
||||
|
||||
freecad-utils = callPackage ./freecad-utils.nix { };
|
||||
in
|
||||
freecad-utils.makeCustomizable (
|
||||
@@ -75,79 +72,42 @@ freecad-utils.makeCustomizable (
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
gfortran
|
||||
swig
|
||||
doxygen
|
||||
wrapGAppsHook3
|
||||
]
|
||||
++ lib.optionals (qtVersion == 5) [
|
||||
pyside2-tools
|
||||
qt5.wrapQtAppsHook
|
||||
]
|
||||
++ lib.optionals (qtVersion == 6) [ qt6.wrapQtAppsHook ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
gfortran
|
||||
swig
|
||||
doxygen
|
||||
wrapGAppsHook3
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
boost
|
||||
coin3d
|
||||
eigen
|
||||
fmt
|
||||
gitpython # for addon manager
|
||||
gts
|
||||
hdf5
|
||||
libGLU
|
||||
libXmu
|
||||
matplotlib
|
||||
medfile
|
||||
mpi
|
||||
ode
|
||||
opencamlib
|
||||
pivy
|
||||
ply # for openSCAD file support
|
||||
py-slvs
|
||||
pybind11
|
||||
pycollada
|
||||
python
|
||||
pyyaml # (at least for) PyrateWorkbench
|
||||
scipy
|
||||
vtk
|
||||
xercesc
|
||||
yaml-cpp
|
||||
zlib
|
||||
]
|
||||
++ lib.optionals (qtVersion == 5) [
|
||||
libsForQt5.soqt
|
||||
opencascade-occt_7_6
|
||||
pyside2
|
||||
pyside2-tools
|
||||
shiboken2
|
||||
qt5.qtbase
|
||||
qt5.qttools
|
||||
qt5.qtwayland
|
||||
qt5.qtwebengine
|
||||
qt5.qtxmlpatterns
|
||||
]
|
||||
++ lib.optionals (qtVersion == 6) [
|
||||
opencascade-occt
|
||||
pyside6
|
||||
shiboken6
|
||||
qt6.qtbase
|
||||
qt6.qtsvg
|
||||
qt6.qttools
|
||||
qt6.qtwayland
|
||||
qt6.qtwebengine
|
||||
]
|
||||
++ lib.optionals ifcSupport [
|
||||
ifcopenshell
|
||||
]
|
||||
++ lib.optionals spaceNavSupport (
|
||||
[ libspnav ] ++ lib.optionals (qtVersion == 5) [ libsForQt5.qtx11extras ]
|
||||
);
|
||||
++ pythonDeps
|
||||
++ lib.optionals spaceNavSupport [ libspnav ];
|
||||
|
||||
patches = [
|
||||
./0001-NIXOS-don-t-ignore-PYTHONPATH.patch
|
||||
@@ -158,54 +118,39 @@ freecad-utils.makeCustomizable (
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags =
|
||||
[
|
||||
"-Wno-dev" # turns off warnings which otherwise makes it hard to see what is going on
|
||||
"-DBUILD_FLAT_MESH:BOOL=ON"
|
||||
"-DBUILD_DRAWING=ON"
|
||||
"-DBUILD_FLAT_MESH:BOOL=ON"
|
||||
"-DINSTALL_TO_SITEPACKAGES=OFF"
|
||||
"-DFREECAD_USE_PYBIND11=ON"
|
||||
]
|
||||
++ lib.optionals (qtVersion == 5) [
|
||||
"-DBUILD_QT5=ON"
|
||||
"-DSHIBOKEN_INCLUDE_DIR=${shiboken2}/include"
|
||||
"-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
|
||||
(
|
||||
"-DPYSIDE_INCLUDE_DIR=${pyside2}/include"
|
||||
+ ";${pyside2}/include/PySide2/QtCore"
|
||||
+ ";${pyside2}/include/PySide2/QtWidgets"
|
||||
+ ";${pyside2}/include/PySide2/QtGui"
|
||||
)
|
||||
"-DPYSIDE_LIBRARY=PySide2::pyside2"
|
||||
]
|
||||
++ lib.optionals (qtVersion == 6) [
|
||||
"-DBUILD_QT5=OFF"
|
||||
"-DBUILD_QT6=ON"
|
||||
"-DSHIBOKEN_INCLUDE_DIR=${shiboken6}/include"
|
||||
"-DSHIBOKEN_LIBRARY=Shiboken6::libshiboken"
|
||||
(
|
||||
"-DPYSIDE_INCLUDE_DIR=${pyside6}/include"
|
||||
+ ";${pyside6}/include/PySide6/QtCore"
|
||||
+ ";${pyside6}/include/PySide6/QtWidgets"
|
||||
+ ";${pyside6}/include/PySide6/QtGui"
|
||||
)
|
||||
"-DPYSIDE_LIBRARY=PySide6::pyside6"
|
||||
];
|
||||
cmakeFlags = [
|
||||
"-Wno-dev" # turns off warnings which otherwise makes it hard to see what is going on
|
||||
"-DBUILD_FLAT_MESH:BOOL=ON"
|
||||
"-DBUILD_DRAWING=ON"
|
||||
"-DBUILD_FLAT_MESH:BOOL=ON"
|
||||
"-DINSTALL_TO_SITEPACKAGES=OFF"
|
||||
"-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";
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
|
||||
'';
|
||||
dontWrapGApps = true;
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1"
|
||||
"--prefix PATH : ${libredwg}/bin"
|
||||
] ++ lib.optionals (!withWayland) [ "--set QT_QPA_PLATFORM xcb" ];
|
||||
"--prefix PYTHONPATH : ${python3Packages.makePythonPath pythonDeps}"
|
||||
"\${gappsWrapperArgs[@]}"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
mv $out/share/doc $out
|
||||
|
||||
@@ -697,6 +697,8 @@ mapAliases {
|
||||
fractal-next = fractal; # added 2023-11-25
|
||||
framework-system-tools = framework-tool; # added 2023-12-09
|
||||
francis = kdePackages.francis; # added 2024-07-13
|
||||
freecad-qt6 = freecad; # added 2025-06-14
|
||||
freecad-wayland = freecad; # added 2025-06-14
|
||||
freerdp3 = freerdp; # added 2025-03-25
|
||||
freerdpUnstable = freerdp; # added 2025-03-25
|
||||
frostwire = throw "frostwire was removed, as it was broken due to reproducibility issues, use `frostwire-bin` package instead."; # added 2024-05-17
|
||||
|
||||
@@ -14955,12 +14955,6 @@ with pkgs;
|
||||
|
||||
flightgear = libsForQt5.callPackage ../games/flightgear { };
|
||||
|
||||
freecad-wayland = freecad.override { withWayland = true; };
|
||||
freecad-qt6 = freecad.override {
|
||||
withWayland = true;
|
||||
qtVersion = 6;
|
||||
};
|
||||
|
||||
freeciv = callPackage ../games/freeciv {
|
||||
sdl2Client = false;
|
||||
gtkClient = true;
|
||||
|
||||
Reference in New Issue
Block a user