~ruther/guix-local

4f6d69b4a184cb46c1878b9721af8b1821d8435a — Nicolas Graves a month ago e6d1f85
gnu: libxapp: Switch to pyproject.

* gnu/packages/cinnamon.scm (libxapp):
[arguments]<#:modules, #:imported-modules, #:configure-flags, #:phases>:
Switch to pyproject-build-system.
<#:phases>: In phase 'set-gtk-module-path, use helper string-quote.

Change-Id: Ibfb493d070a739b3114f4fd222d97dd98024981b
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
1 files changed, 25 insertions(+), 29 deletions(-)

M gnu/packages/cinnamon.scm
M gnu/packages/cinnamon.scm => gnu/packages/cinnamon.scm +25 -29
@@ 29,6 29,7 @@
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system meson)
  #:use-module (guix build-system pyproject)
  #:use-module (guix build-system python)
  #:use-module (gnu packages)
  #:use-module (gnu packages admin)


@@ 72,41 73,36 @@
      #:modules
      `((guix build meson-build-system)
        (guix build utils)
        ((guix build python-build-system) #:prefix python:))
        ((guix build pyproject-build-system) #:prefix py:))
      #:imported-modules
      `(,@%meson-build-system-modules
        (guix build python-build-system))
      (append %meson-build-system-modules
              %pyproject-build-system-modules)
      #:configure-flags
      #~(list (string-append
               "-Dpy-overrides-dir="
               (python:site-packages %build-inputs %outputs) "/gi/overrides"))
               (py:site-packages %build-inputs %outputs) "/gi/overrides"))
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'configure 'set-gtk-module-path
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "libxapp/meson.build"
                (("gtk3_dep\\.get_pkgconfig_variable[(]'libdir'[)]")
                 (string-append "'" (assoc-ref outputs "out") "/lib'")))

              (substitute* "scripts/pastebin"
                (("'nc'")
                 (string-append "'"
                                (search-input-file inputs "/bin/nc")
                                "'")))
      (with-extensions (list (pyproject-guile-json))
        #~(modify-phases %standard-phases
            (add-before 'configure 'set-gtk-module-path
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (define (string-quote str)
                  (format #f "'~a'" str))
                (substitute* "libxapp/meson.build"
                  (("gtk3_dep\\.get_pkgconfig_variable[(]'libdir'[)]")
                   (string-quote (string-append #$output "/lib"))))

              (substitute* "scripts/upload-system-info"
                (("'inxi'")
                 (string-append "'"
                                (search-input-file inputs "/bin/inxi")
                                "'"))
                (("'/usr/bin/pastebin'")
                 (string-append "'"
                                (assoc-ref outputs "out")
                                "/bin/pastebin'"))
                (("'xdg-open'")
                 (string-append "'"
                                (search-input-file inputs "/bin/xdg-open")
                                "'"))))))))
                (substitute* "scripts/pastebin"
                  (("'nc'")
                   (string-quote (search-input-file inputs "/bin/nc"))))
                (substitute* "scripts/upload-system-info"
                  (("'inxi'")
                   (string-quote (search-input-file inputs "/bin/inxi")))
                  (("'/usr/bin/pastebin'")
                   (string-quote (string-append #$output "/bin/pastebin")))
                  (("'xdg-open'")
                   (string-quote (search-input-file inputs
                                                    "/bin/xdg-open"))))))))))
    (inputs
     (list dbus
           glib                         ; for gio