me
/
guix
Archived
1
0
Fork 0

gnu: libfive: Generate bindings instead of using pre-generated ones.

* gnu/packages/engineering.scm (libfive)[phases]: Add phase 'generate-bindings
to generate the bindings

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Morgan Smith 2023-05-10 13:46:20 -04:00 committed by Ludovic Courtès
parent 3b4a31d52c
commit c95e817bb9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 10 additions and 0 deletions

View File

@ -941,6 +941,16 @@ fonts to gEDA.")
(substitute* "libfive/bind/python/libfive/ffi.py"
(("os.environ.get\\('LIBFIVE_FRAMEWORK_DIR'\\)" m)
(string-append m " or \"" #$output "/lib/\"")))))
(add-before 'build 'generate-bindings
(lambda _
;; These files already exist but we regenerate them from source
(with-directory-excursion "../source/libfive/stdlib"
(substitute* '("gen_scm.py" "gen_c.py" "gen_py.py")
(("datetime.now\\(\\)\\.strftime\\([^)]+)") "\"N/A\"")
(("os\\.getlogin\\(\\)") "\"guix\""))
(invoke "python" "gen_scm.py")
(invoke "python" "gen_c.py")
(invoke "python" "gen_py.py"))))
(add-after 'unpack 'do-not-build-guile-bindings
(lambda _
(delete-file "libfive/bind/guile/CMakeLists.txt")