gnu: ploticus: Refresh package style.

* gnu/packages/plotutils.scm (ploticus): Apply G-expressions to refresh
package style.

Change-Id: Iabf465a9bd4e02c1087b117533dbbf0b4c1a3f14
This commit is contained in:
Sharlatan Hellseher 2024-04-13 13:43:44 +01:00
parent d1146d8ecb
commit 238e4ec73e
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -310,38 +310,32 @@ (define-public ploticus
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
;; Install binaries in the right place. ;; Install binaries in the right place.
'(begin #~(begin
(substitute* "src/Makefile" (substitute* "src/Makefile"
(("INSTALLBIN =.*$") (("INSTALLBIN =.*$")
(string-append "INSTALLBIN = $(out)/bin"))) (string-append "INSTALLBIN = $(out)/bin")))))))
#t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:tests? #f (list
#:tests? #f ; no tests
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(replace 'configure (lambda _ (chdir "src"))) (replace 'configure (lambda _ (chdir "src")))
(add-before 'install 'make-target-directories (add-before 'install 'make-target-directories
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out"))) (mkdir-p (string-append #$output "/bin"))))
(mkdir-p (string-append out "/bin"))
#t)))
(add-after 'install 'install-prefabs (add-after 'install 'install-prefabs
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let* ((out #$output)
(dir (string-append out (dir (string-append out "/share/ploticus/prefabs"))
"/share/ploticus/prefabs"))
(bin (string-append out "/bin"))) (bin (string-append out "/bin")))
(mkdir-p dir) (mkdir-p dir)
;; Install "prefabs". ;; Install "prefabs".
(for-each (lambda (file) (for-each
(let ((target (lambda (file)
(string-append dir "/" (let ((target (string-append dir "/" (basename file))))
(basename file))))
(copy-file file target))) (copy-file file target)))
(find-files "../prefabs" ".")) (find-files "../prefabs" "."))
;; Allow them to be found. ;; Allow them to be found.
(wrap-program (string-append bin "/pl") (wrap-program (string-append bin "/pl")
`("PLOTICUS_PREFABS" ":" = (,dir))))))))) `("PLOTICUS_PREFABS" ":" = (,dir)))))))))