~ruther/guix-local

c2f8f669170a0e3e22cef96e53788487d0579b69 — Nicolas Graves 2 months ago d9e834b
gnu: impressive: Switch to pyproject.

* gnu/packages/pdf.scm (impressive):
[build-system]: Switch to pyproject-build-system.
[arguments]<#:tests?, phases>: Improve style.
[native-inputs]: Add python-setuptools.

Change-Id: I0a9d0515c5758b871a27968edd63ac26e5b4d9dc
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 20 insertions(+), 18 deletions(-)

M gnu/packages/pdf.scm
M gnu/packages/pdf.scm => gnu/packages/pdf.scm +20 -18
@@ 1299,26 1299,28 @@ vector formats.")
        (base32
         ;; "0d1d2jxfl9vmy4swcdz660xd4wx91w1i3n07k522pccapwxig294"))))
         "0g15q67f992prkjndrk75hhd601iypfmkafhdx7hijs2byr26c83"))))
    (build-system python-build-system)
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases #~(modify-phases %standard-phases
                   (delete 'build)
                   (delete 'configure)
                   (delete 'check)
                   (replace 'install
                     (lambda* (#:key inputs #:allow-other-keys)
                       ;; There's no 'setup.py' so install things manually.
                       (let* ((bin (string-append #$output "/bin"))
                              (impressive (string-append bin "/impressive"))
                              (man1 (string-append #$output "/share/man/man1")))
                         (mkdir-p bin)
                         (copy-file "impressive.py" impressive)
                         (chmod impressive #o755)
                         (wrap-program (string-append bin "/impressive")
                           `("PATH" ":" prefix ;for pdftoppm
                             (,(search-input-file inputs "bin/xpdf"))))
                         (install-file "impressive.1" man1)))))))
      #:tests? #f                       ;No tests.
      #:phases
      #~(modify-phases %standard-phases
          (delete 'build)
          (delete 'configure)
          (replace 'install
            (lambda* (#:key inputs #:allow-other-keys)
              ;; There's no 'setup.py' so install things manually.
              (let* ((bin (string-append #$output "/bin"))
                     (impressive (string-append bin "/impressive"))
                     (man1 (string-append #$output "/share/man/man1")))
                (mkdir-p bin)
                (copy-file "impressive.py" impressive)
                (chmod impressive #o755)
                (wrap-program (string-append bin "/impressive")
                  `("PATH" ":" prefix ;for pdftoppm
                    (,(search-input-file inputs "bin/xpdf"))))
                (install-file "impressive.1" man1)))))))
    (native-inputs (list python-setuptools))
    ;; TODO: Add dependency on pdftk.
    (inputs (list bash-minimal python-pygame python-pillow sdl xpdf))
    (home-page "https://impressive.sourceforge.net")