gnu: pythonscad: Fix in-application version display.

* gnu/packages/engineering.scm (pythonscad): Fix in-application version
display.
[arguments]<#:configure-flags>: Filter out flags "-DOPENSCAD_VERSION" and
"-DOPENSCAD_COMMIT" from inherited package. Add flags "-DOPENSCAD_VERSION" and
"-DOPENSCAD_COMMIT" locally.

Change-Id: I3d0b8e97dfb14041491cfd67baf1a9d3d15c1b86
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
This commit is contained in:
nomike 2025-08-06 02:30:48 +02:00 committed by Danny Milosavljevic
parent c1045f169a
commit f70a74b2ff
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -3477,13 +3477,23 @@ models in the STL and OFF file formats.")
(file-name (git-file-name name version))))
(arguments
(substitute-keyword-arguments (package-arguments openscad)
((#:configure-flags flags
'())
#~(append #$flags
(list "-DENABLE_LIBFIVE=ON" "-DUSE_BUILTIN_LIBFIVE=OFF"
(string-append "-DPYTHON_VERSION="
#$(version-major+minor
(package-version python))))))
((#:configure-flags flags)
#~(begin
(use-modules (srfi srfi-1))
(append
(remove (lambda (flag)
(or (string-prefix? "-DOPENSCAD_VERSION=" flag)
(string-prefix? "-DOPENSCAD_COMMIT=" flag)))
#$flags)
(list "-DENABLE_LIBFIVE=ON"
"-DUSE_BUILTIN_LIBFIVE=OFF"
(string-append "-DOPENSCAD_VERSION="
#$version)
(string-append "-DOPENSCAD_COMMIT="
#$commit)
(string-append "-DPYTHON_VERSION="
#$(version-major+minor
(package-version python)))))))
((#:phases phases)
#~(modify-phases #$phases
(replace 'patch-source