aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/lirc.scm
blob: e95f54280df857ba2750b789991e3d827a7c2f95 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu services lirc)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (gnu packages lirc)
  #:use-module (guix gexp)
  #:use-module (guix records)
  #:use-module (ice-9 match)
  #:export (lirc-configuration
            lirc-configuation?
            lirc-service
            lirc-service-type))

;;; Commentary:
;;;
;;; LIRC service.
;;;
;;; Code:

(define-record-type* <lirc-configuration>
  lirc-configuration make-lirc-configuration
  lirc-configuation?
  (lirc          lirc-configuration-lirc          ;<package>
                 (default lirc))
  (device        lirc-configuration-device)       ;string
  (driver        lirc-configuration-driver)       ;string
  (config-file   lirc-configuration-file)         ;string | file-like object
  (extra-options lirc-configuration-options       ;list of strings
                 (default '())))

(define %lirc-activation
  #~(begin
      (use-modules (guix build utils))
      (mkdir-p "/var/run/lirc")))

(define lirc-shepherd-service
  (match-lambda
    (($ <lirc-configuration> lirc device driver config-file options)
     (list (shepherd-service
            (provision '(lircd))
            (documentation "Run the LIRC daemon.")
            (requirement '(user-processes))
            (start #~(make-forkexec-constructor
                      (list (string-append #$lirc "/sbin/lircd")
                            "--nodaemon"
                            #$@(if device
                                   #~("--device" #$device)
                                   #~())
                            #$@(if driver
                                   #~("--driver" #$driver)
                                   #~())
                            #$@(if config-file
                                   #~(#$config-file)
                                   #~())
                            #$@options)))
            (stop #~(make-kill-destructor)))))))

(define lirc-service-type
  (service-type (name 'lirc)
                (extensions
                 (list (service-extension shepherd-root-service-type
                                          lirc-shepherd-service)
                       (service-extension activation-service-type
                                          (const %lirc-activation))))))

(define* (lirc-service #:key (lirc lirc)
                       device driver config-file
                       (extra-options '()))
  "Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that
decodes infrared signals from remote controls.

The daemon will use specified @var{device}, @var{driver} and
@var{config-file} (configuration file name).

Finally, @var{extra-options} is a list of additional command-line options
passed to @command{lircd}."
  (service lirc-service-type
           (lirc-configuration
            (lirc lirc)
            (device device) (driver driver)
            (config-file config-file)
            (extra-options extra-options))))

;;; lirc.scm ends here
n class='msg-avail'>...QGIS support for SAGA is currently not working. * gnu/packages/geo.scm (qgis)[inputs]: Remove saga. [arguments]: Remove PATH wrapping for saga. Guillaume Le Vaillant 2021-02-03gnu: qmapshack: Update to 1.15.2....* gnu/packages/geo.scm (qmapshack): Update to 1.15.2. Guillaume Le Vaillant 2021-01-27gnu: Add shapelib...* gnu/packages/geo.scm (shapelib): New variable Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Sharlatan Hellseher 2021-01-02gnu: routino: Update to 3.3.3....* gnu/packages/geo.scm (routino): Update to 3.3.3. Tobias Geerinckx-Rice 2020-12-29gnu: readosm: Update source hash....Looks like the tarball was changed by upstream, lots of timestamps changed from 2020-08-02 to 2020-08-23, and there were some minor changes to file contents. * gnu/packages/geo.scm (source): Update hash. Christopher Baines 2020-12-29gnu: gnome-maps: Patch DBUS service....* gnu/packages/geo.scm (gnome-maps): [arguments]<#:phases>: Add patch-dbus-service. Leo Prikler 2020-12-23gnu: grass: Update to 7.8.5....* gnu/packages/geo.scm (grass): Update to 7.8.5. Tobias Geerinckx-Rice 2020-12-13gnu: josm: Update to 17329....* gnu/packages/geo.scm (josm): Update to 17329. Julien Lepiller 2020-12-01gnu: libspatialite: Update to 5.0.0....* gnu/packages/geo.scm (libspatialite, spatialite-tools): Update to 5.0.0. [inputs]: Add new required dependencies minizip and librttopo. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Felix Gruber 2020-12-01gnu: Add librttopo....* gnu/packages/geo.scm (librttopo): New variable. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Felix Gruber 2020-11-24gnu: postgis: Update to 3.0.3....* gnu/packages/geo.scm (postgis): Update to 3.0.3. Tobias Geerinckx-Rice 2020-11-19gnu: Don't append '.git' to GitHub uris....* gnu/packages/admin.scm (nmrpflash)[source]: Remove '.git' from URI. * gnu/packages/aidc.scm (zxing-cpp), * gnu/packages/assembly.scm (mbuild), * gnu/packages/audio.scm (opensles, wildmidi, tinyalsa), * gnu/packages/browser-extensions.scm (ublock-origin-chromium), * gnu/packages/check.scm (mutest), * gnu/packages/compression.scm (unshield), * gnu/packages/coq.scm (subset), * gnu/packages/dictionaries.scm (translate-shell), * gnu/packages/disk.scm (memkind), * gnu/packages/documentation.scm (latex2html), * gnu/packages/emacs-xyz.scm (emacs-chronometrist, emacs-flycheck-ledger, emacs-counsel-notmuch, emacs-spaceline, emacs-org-generate), * gnu/packages/embedded.scm (ebusd, ebusd-configuration), * gnu/packages/enchant.scm (nuspell), * gnu/packages/fontutils.scm (woff2), * gnu/packages/geo.scm (memphis), * gnu/packages/gimp.scm (mrg), * gnu/packages/gnome-xyz.scm (gnome-shell-extension-appindicator), * gnu/packages/gnome.scm (parlatype), * gnu/packages/golang.scm (go-github-com-tv42-httpunix, go-github-com-ayufan-golang-kardianos-service), * gnu/packages/graphics.scm (eglexternalplatform, egl-wayland, mmm, directfb, flux), * gnu/packages/gstreamer.scm (openni2, ccextractor, libvisual, graphene), * gnu/packages/guile-xyz.scm (guile-srfi-180, guile-torrent), * gnu/packages/image.scm (openjpeg-data), * gnu/packages/java.scm (javacc), * gnu/packages/language.scm (liblouis, liblouisutdml), * gnu/packages/linux.scm (pamela, ttyebus), * gnu/packages/lxqt.scm (lxqt-connman-applet), * gnu/packages/mail.scm (libetpan), * gnu/packages/man.scm (ronn), * gnu/packages/music.scm (tascam-gtk, artyfx), * gnu/packages/networking.scm (srt, lksctp-tools, nng, nanomsg), * gnu/packages/python-crypto.scm (pure-python-otr), * gnu/packages/qt.scm (qtspell), * gnu/packages/raspberry-pi.scm (raspi-gpio, raspi-open-firmware), * gnu/packages/rdp.scm (freerdp), * gnu/packages/ruby.scm (ruby-prawn-templates, ruby-treetop, ruby-gimme, ruby-standard, ruby-rubocop-ast, ruby-rexml, ruby-range-compressor, ruby-regexp-property-values, ruby-regexp-parser, ruby-rubocop, ruby-pdf-reader, ruby-pdf-inspector, ruby-prawn), * gnu/packages/syncthing.scm (syncthing-gtk), * gnu/packages/video.scm (svt-hevc, mediasdk, libvideogfx, libde265, tslib), * gnu/packages/xml.scm (libxmlb, libxmlplusplus)[source]: Same. Efraim Flashner 2020-10-26gnu: qgis: Fix many plugins....Fixes <https://issues.guix.gnu.org/42941>. This fixes the installation of many plugins. * gnu/packages/geo.scm (qgis)[inputs]: Add python-future. Signed-off-by: Christopher Baines <mail@cbaines.net> Jonathan Brielmaier 2020-10-22gnu: josm: Update to 17084....* gnu/packages/geo.scm (josm): Update to 17084. Julien Lepiller 2020-10-16gnu: grass: Fix start-up without python@3 in profile....* gnu/packages/geo.scm (grass)[arguments]: Rename ‘wrap-python’ phase to ‘python:wrap’. Add ‘wrap-with-python-interpreter’ phase. Tobias Geerinckx-Rice 2020-10-16gnu: grass: Update to 7.8.4....* gnu/packages/geo.scm (grass): Update to 7.8.4. Tobias Geerinckx-Rice