gnu: autorandr: Update to 1.9.

* gnu/packages/xdisorg.scm (autorandr): Update to 1.9.
[native-inputs]: Remove man-db.
[arguments]: Install XDG autostart config.
This commit is contained in:
Brice Waegeneire 2020-02-09 10:10:48 +01:00 committed by Nicolas Goaziou
parent e2684594f6
commit cde4cb4dd2
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -32,6 +32,7 @@
;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 David Wilson <david@daviwil.com> ;;; Copyright © 2020 David Wilson <david@daviwil.com>
;;; Copyright © 2020 Ivan Vilata i Balaguer <ivan@selidor.net> ;;; Copyright © 2020 Ivan Vilata i Balaguer <ivan@selidor.net>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -153,58 +154,53 @@ (define-public arandr
(license license:gpl3+))) (license license:gpl3+)))
(define-public autorandr (define-public autorandr
;; Use latest commit since 1.7 lacks many new features such as the (package
;; autorandr_launcher. (name "autorandr")
(let ((commit "b484c0ea9c9a4838278bbd661a7cc384333c1df8")) (version "1.9")
(package (home-page "https://github.com/phillipberndt/autorandr")
(name "autorandr") (source
(version (git-version "1.7" "1" commit)) (origin
(home-page "https://github.com/phillipberndt/autorandr") (method git-fetch)
(source (uri (git-reference
(origin (url home-page)
(method git-fetch) (commit version)))
(uri (git-reference (file-name (git-file-name name version))
(url home-page) (sha256
(commit commit))) (base32 "1bb0l7fcm5lcx9y02zdxv7pfdqf4v4gsc5br3v1x9gzjvqj64l7n"))))
(file-name (git-file-name name version)) (build-system python-build-system)
(sha256 (inputs
(base32 `(("xrandr" ,xrandr)
"0da17kzsisjv3s993j5idkk1n2d2cvjdn7pngs2b0ic1r2h5z02h")))) ("libxcb" ,libxcb)))
(build-system python-build-system) (arguments
(native-inputs `(#:phases
`(("man-db" ,man-db))) (modify-phases %standard-phases
(inputs (add-before 'build 'configure
`(("xrandr" ,xrandr) (lambda* (#:key inputs outputs #:allow-other-keys)
("libxcb" ,libxcb))) (let ((xrandr (string-append (assoc-ref inputs "xrandr")
(arguments "/bin/xrandr")))
`(#:phases (substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
(modify-phases %standard-phases (("/usr") (assoc-ref outputs "out")))
(add-before 'build 'configure
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "autorandr.py" (substitute* "autorandr.py"
(("popen\\(\"xrandr") (string-append "popen(\"" (("popen\\(\"xrandr") (string-append "popen(\"" xrandr))
(assoc-ref inputs "xrandr") (("\\[\"xrandr") (string-append "[\"" xrandr))))
"/bin/xrandr")) #t))
(("\\[\"xrandr") (string-append "[\"" (add-after 'install 'install-contrib
(assoc-ref inputs "xrandr") (lambda* (#:key outputs #:allow-other-keys)
"/bin/xrandr"))) (invoke "make"
#t)) (string-append "DESTDIR=" (assoc-ref outputs "out"))
(add-after 'install 'install-contrib "PREFIX="
(lambda* (#:key outputs #:allow-other-keys) "BASH_COMPLETIONS_DIR=etc/bash_completiond.d"
(invoke "make" "install_manpage"
(string-append "DESTDIR=" (assoc-ref outputs "out")) "install_bash_completion"
"PREFIX=" "install_launcher"
"BASH_COMPLETIONS_DIR=etc/bash_completiond.d" "install_autostart_config"))))))
"install_manpage" (synopsis "Auto-detect connected displays and load appropriate setup")
"install_bash_completion" (description "Autorandr wraps around xrandr to help with X11
"install_launcher"))))))
(synopsis "Auto-detect connected displays and load appropriate setup")
(description "Autorandr wraps around xrandr to help with X11
multi-screen configuration management. It allows the user to create profiles multi-screen configuration management. It allows the user to create profiles
for various multi-screen setups. Autorandr automatically detects the profiles for various multi-screen setups. Autorandr automatically detects the profiles
that can be activated based on the connected hardware. Hook scripts can be that can be activated based on the connected hardware. Hook scripts can be
used to further tweak the behaviour of the different profiles.") used to further tweak the behaviour of the different profiles.")
(license license:gpl3+)))) (license license:gpl3+)))
(define-public bemenu (define-public bemenu
(package (package