Wrap freecad with gmsh and calculix to run FEM

This commit is contained in:
xenia 2024-12-03 23:22:38 +01:00
parent 847aa60fd5
commit ebe8a99d0c

View File

@ -34,6 +34,30 @@ let start-plasma-shortcut = pkgs.writeScriptBin "desktop" ''
done
'';
};
freecad-fem = pkgs.stdenv.mkDerivation {
name = "freecad-fem";
version = pkgs.freecad-wayland.version;
src = pkgs.freecad-wayland;
buildInputs = [ pkgs.makeWrapper ];
buildPhase = ''
cp -r $src $out
chmod -R u+w $out
wrapProgram $out/bin/FreeCAD \
--set PATH ${pkgs.lib.makeBinPath [ pkgs.gmsh pkgs.calculix pkgs.which ]}
'';
};
# freecad-fem = pkgs.freecad-wayland.overrideAttrs (final: prev: {
# # enable packages needed for FEM
# postFixup = ''
# wrapProgram $out/bin/freecad \
# --set PATH ${pkgs.lib.makeBinPath [ pkgs.gmsh pkgs.calculix ]}
# '';
# });
in
{
services.xserver = {
@ -89,6 +113,7 @@ in
remmina
libreoffice
kicad-patch
freecad-fem
]) ++ (with pkgs_2405; [
firefox
]);