gnu: arandr: Fix build.

This is a follow-up to commit 218c785850.

[arguments]: Remove unnecessary #:python flag.  Add 'wrap-gi-typelib' phase.
[inputs]: Remove python2-pygtk and add gtk+, python-pycairo, and
python-pygobject.
[native-inputs]: Replace python2-docutils with python-docutils.
This commit is contained in:
Kei Kebreau 2019-12-30 12:37:08 -05:00
parent 7366d83191
commit 06c8e87224
No known key found for this signature in database
GPG key ID: E6A5EE3C19467A0D

View file

@ -117,20 +117,28 @@ (define-public arandr
#t)))) #t))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:python ,python-2 ;incompatible with python 3 `(#:phases
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'build 'configure (add-before 'build 'configure
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "screenlayout/xrandr.py" (substitute* "screenlayout/xrandr.py"
(("\"xrandr\"") (string-append "\"" (assoc-ref inputs "xrandr") (("\"xrandr\"") (string-append "\"" (assoc-ref inputs "xrandr")
"/bin/xrandr\""))) "/bin/xrandr\"")))
#t))
(add-after 'install 'wrap-gi-typelib
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
(wrap-program (string-append out "/bin/arandr")
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
#t))) #t)))
#:tests? #f)) ;no tests #:tests? #f)) ;no tests
(inputs `(("pygtk" ,python2-pygtk) (inputs `(("gtk+" ,gtk+)
("pycairo" ,python-pycairo)
("pygobject" ,python-pygobject)
("xrandr" ,xrandr))) ("xrandr" ,xrandr)))
(native-inputs `(("gettext" ,gettext-minimal) (native-inputs `(("gettext" ,gettext-minimal)
("python-docutils" ,python2-docutils))) ("python-docutils" ,python-docutils)))
(home-page "https://christian.amsuess.com/tools/arandr/") (home-page "https://christian.amsuess.com/tools/arandr/")
(synopsis "Another RandR graphical user interface") (synopsis "Another RandR graphical user interface")
;; TRANSLATORS: "X11 resize-and-rotate" should not be translated. ;; TRANSLATORS: "X11 resize-and-rotate" should not be translated.