diff options
author | Morgan Smith <Morgan.J.Smith@outlook.com> | 2023-05-10 13:46:20 -0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-05-18 19:38:35 +0200 |
commit | c95e817bb986c49fd0d2a8896c2e63782f05a7f7 (patch) | |
tree | 81e178ed737fce48a69b9f33d4942b48edb9a5e8 /gnu/packages/engineering.scm | |
parent | 3b4a31d52c9adf919830f13cb01cbbeeeebea87c (diff) | |
download | guix-c95e817bb986c49fd0d2a8896c2e63782f05a7f7.tar.gz |
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>
Diffstat (limited to 'gnu/packages/engineering.scm')
-rw-r--r-- | gnu/packages/engineering.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index c2767234fd..91d20c9e3b 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -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") |