diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-01-10 14:30:36 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-01-10 14:30:36 +0200 |
commit | 6985a1acb3e9cc4cad8b6f63d77154842d25c929 (patch) | |
tree | 4df49b9f438e0e466efb3d589027a62b39d49761 /gnu/packages/gtk.scm | |
parent | 87eaa4207208e16e5e1b22b60ba4ff5c3d035023 (diff) | |
parent | d0fff8f840afc17be40bdc49bff52ed08d5a1a7b (diff) | |
download | guix-6985a1acb3e9cc4cad8b6f63d77154842d25c929.tar guix-6985a1acb3e9cc4cad8b6f63d77154842d25c929.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/gtk.scm')
-rw-r--r-- | gnu/packages/gtk.scm | 67 |
1 files changed, 60 insertions, 7 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 28099ffb63..cd6f9bd7ce 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> -;;; Coypright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net> +;;; Coypright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de> ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net> @@ -962,8 +962,35 @@ application suites.") (arguments ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build ;; because of them. - '(#:configure-flags '("--disable-Werror") - #:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings + `(#:configure-flags '("--disable-Werror") + #:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings + #:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 rdelim) + (ice-9 popen)) + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-go-files + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (effective (read-line + (open-pipe* OPEN_READ + "guile" "-c" + "(display (effective-version))"))) + (module-dir (string-append out "/share/guile/site/" + effective)) + (object-dir (string-append out "/lib/guile/" effective + "/site-ccache")) + (prefix (string-length module-dir))) + ;; compile to the destination + (for-each (lambda (file) + (let* ((base (string-drop (string-drop-right file 4) + prefix)) + (go (string-append object-dir base ".go"))) + (invoke "guild" "compile" "-L" module-dir + file "-o" go))) + (find-files module-dir "\\.scm$")) + #t)))))) (inputs `(("guile-lib" ,guile-lib) ("expat" ,expat) @@ -1024,10 +1051,36 @@ exceptions, macros, and a dynamic programming environment.") (file-name (string-append name "-" version ".tar.gz")))) (build-system gnu-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (replace 'bootstrap - (lambda _ - (invoke "autoreconf" "-vfi")))))) + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 rdelim) + (ice-9 popen)) + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + (invoke "autoreconf" "-vfi"))) + (add-after 'install 'install-go-files + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (effective (read-line + (open-pipe* OPEN_READ + "guile" "-c" + "(display (effective-version))"))) + (module-dir (string-append out "/share/guile/site/" + effective)) + (object-dir (string-append out "/lib/guile/" effective + "/site-ccache")) + (prefix (string-length module-dir))) + ;; compile to the destination + (for-each (lambda (file) + (let* ((base (string-drop (string-drop-right file 4) + prefix)) + (go (string-append object-dir base ".go"))) + (invoke "guild" "compile" "-L" module-dir + file "-o" go))) + (find-files module-dir "\\.scm$")) + #t)))))) (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) ("automake" ,automake) |