~ruther/guix-local

019a912a5b4136e0df8a8ab8799aa2e644f1e077 — Artyom V. Poptsov 6 months ago 44bd0e2
gnu: drip: Use GEXPs.

* gnu/packages/java.scm (drip): Use GEXPs.

Change-Id: I9849de8f0caa4cf246dd30a49a2bcf2984125ee6
1 files changed, 37 insertions(+), 40 deletions(-)

M gnu/packages/java.scm
M gnu/packages/java.scm => gnu/packages/java.scm +37 -40
@@ 2280,46 2280,43 @@ Tool for Language Recognition v3).")
      (native-inputs
       `(("jdk" ,icedtea "jdk")))
      (arguments
       `(#:tests? #f                    ; No tests.
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
           (add-before 'build 'relax-gcc-14-strictness
             (lambda _
               (substitute* "Makefile"
                 (("	gcc(.*)$" all options)
                  (string-append
                   "	gcc"
                   " -Wno-error=incompatible-pointer-types"
                   " -Wno-error=implicit-function-declaration"
                   options)))))
           (add-before 'install 'fix-wrapper
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((jps (search-input-file inputs "/bin/jps")))
                 (substitute* "bin/drip"
                   (("jps") jps)
                   (("brew update && brew upgrade drip") "guix pull && guix install drip")
                   ;; No need to make:
                   (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
                   ;; No need to include source:
                   (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
                    "true"))
                 #t)))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (bin (string-append out "/bin"))
                      (share (string-append out "/share/drip")))
                 (mkdir-p bin)
                 (for-each
                  (lambda (file)
                    (install-file (string-append "bin/" file) bin))
                  '("drip" "drip_daemon" "drip_proxy"))
                 (install-file "drip.jar" share)
                 (substitute* (string-append bin "/drip")
                   (("drip_dir=\\$bin_dir/..")
                    (string-append "drip_dir=" share)))
                 #t))))))
       (list #:tests? #f                    ; No tests.
             #:phases
             #~(modify-phases %standard-phases
                 (delete 'configure)
                 (add-before 'build 'relax-gcc-14-strictness
                   (lambda _
                     (substitute* "Makefile"
                       (("	gcc(.*)$" all options)
                        (string-append
                         "	gcc"
                         " -Wno-error=incompatible-pointer-types"
                         " -Wno-error=implicit-function-declaration"
                         options)))))
                 (add-before 'install 'fix-wrapper
                   (lambda* (#:key inputs #:allow-other-keys)
                     (let ((jps (search-input-file inputs "/bin/jps")))
                       (substitute* "bin/drip"
                         (("jps") jps)
                         (("brew update && brew upgrade drip") "guix pull && guix install drip")
                         ;; No need to make:
                         (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
                         ;; No need to include source:
                         (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
                          "true")))))
                 (replace 'install
                   (lambda* (#:key outputs #:allow-other-keys)
                     (let* ((bin (string-append #$output "/bin"))
                            (share (string-append #$output "/share/drip")))
                       (mkdir-p bin)
                       (for-each
                        (lambda (file)
                          (install-file (string-append "bin/" file) bin))
                        '("drip" "drip_daemon" "drip_proxy"))
                       (install-file "drip.jar" share)
                       (substitute* (string-append bin "/drip")
                         (("drip_dir=\\$bin_dir/..")
                          (string-append "drip_dir=" share)))))))))
      (home-page "https://github.com/ninjudd/drip")
      (synopsis "Faster Java Virtual Machine launching")
      (description "Drip is a launcher for the Java Virtual Machine that