mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
[Backport release-26.05] freecad: 1.1.1 -> 1.1.3 (#552174)
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
which,
|
||||
gtk3,
|
||||
gsettings-desktop-schemas,
|
||||
versionCheckHook,
|
||||
writeShellScript,
|
||||
}:
|
||||
let
|
||||
pythonDeps = with python3Packages; [
|
||||
@@ -58,13 +60,13 @@ in
|
||||
freecad-utils.makeCustomizable (
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "freecad";
|
||||
version = "1.1.1";
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FreeCAD";
|
||||
repo = "FreeCAD";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-7/VEbs8YDM1Xwc819ab6av5fgRSIbbB6LeCM0V08vRU=";
|
||||
hash = "sha256-RP68rd19wX4gDD5PuRQ1J4Z9Qmp5HpEg6sC94RRMEdI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -150,6 +152,28 @@ freecad-utils.makeCustomizable (
|
||||
};
|
||||
};
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
versionCheckProgram = writeShellScript "version-check.sh" ''
|
||||
# As of 2026-07-26, the way FreeCAD handles `--version` is awful.
|
||||
# - The main program, `freecad`, opens a GUI prompt for `--version`,
|
||||
# unless `--console` is also given.
|
||||
# - Even with `--version --console`, `freecad` crashes if there is no
|
||||
# display server, so we need to use `freecadcmd` instead, which is a
|
||||
# separate binary, for unknown reasons.
|
||||
# - `freecadcmd --version` crashes if it cannot create a directory under
|
||||
# `$HOME/.local/share/FreeCAD/`
|
||||
# Adding `--safe-mode` appears to fix this, but `versionCheckProgramArg`
|
||||
# only allows for a single argument (as a list gets concaternated),
|
||||
# so we need this script.
|
||||
|
||||
# The path to `freecadcmd` gets passed in via $1, to allow the `out`
|
||||
# placeholder to function properly
|
||||
exec "$1" --version --safe-mode
|
||||
'';
|
||||
versionCheckProgramArg = "${placeholder "out"}/bin/freecadcmd";
|
||||
|
||||
# 6.9k object files, cuts down build time from 2-3 hours to 15 minutes
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
@@ -176,8 +200,10 @@ freecad-utils.makeCustomizable (
|
||||
maintainers = with lib.maintainers; [
|
||||
srounce
|
||||
grimmauld
|
||||
acuteaangle
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "freecad";
|
||||
};
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user