aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; 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 packages lighting)
  #:use-module (guix build-system gnu)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages gnunet)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages libftdi)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages protobuf))

(define-public ola
  (package
    (name "ola")
    (version "0.10.9")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/OpenLightingProject/ola")
             (commit version)))
       (sha256
        (base32 "0mbf5dc309pqg9ckqgk2kh9p3mf9vqsjkxnwjzqw7yzzf17ij3zk"))
       (file-name (git-file-name name version))))
    (build-system gnu-build-system)
    (native-inputs
     (list bison
           cppunit
           flex
           pkg-config
           ;; For git repository bootstrapping.
           autoconf
           automake
           libtool))
    (inputs
     (list libftdi
           libmicrohttpd
           libusb
           `(,util-linux "lib")
           zlib))
    (propagated-inputs
     (list protobuf))       ; for pkg-config --libs libola
    (arguments
     (list
      ;; G++ >= 4.8 macro expansion tracking requires lots of memory, causing
      ;; build to fail on low memory systems.  We disable that with the
      ;; following configure flags.
      #:configure-flags #~(list "CXXFLAGS=-ftrack-macro-expansion=0")))
    (synopsis "Framework for controlling entertainment lighting equipment")
    (description "The Open Lighting Architecture is a framework for lighting
control information.  It supports a range of protocols and over a dozen USB
devices.  It can run as a standalone service, which is useful for converting
signals between protocols, or alternatively using the OLA API, it can be used
as the backend for lighting control software.  OLA runs on many different
platforms including ARM, which makes it a perfect fit for low cost Ethernet to
DMX gateways.")
    (home-page "https://www.openlighting.org/ola")
    (license license:lgpl2.1+)))
span='3' class='logmsg'> After installing Guix home on my new foreign system, the locale did not work and GDM did not even let me to log in. After some digging around using tty3 and tty4, I realized the GUIX_LOCPATH is not being set properly. I had nothing installed in the ~/.guix-profile (the symlink did not even exist) and I had glibc-locales installed in ~/.guix-home, yet GUIX_LOCPATH contained "$HOME/.guix-profile/lib/locale:". I believe when the code was modified from the original "home or profile" to the current "home and profile" the || was used by accident instead of &&. I also remove the trailing :, since it is taken care of by the ${...:+:}. * etc/guix-install.sh (sys_create_init_profile): Change-Id: I8a3287fe809af58aee2edc924154eecf91fa1eb8 Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2024-04-29guix-install.sh: Add default value for XCURSOR_PATH.Tomas Volf This improves compatibility with (at least) Gnome based systems. On my new Ubuntu 22.04 install the mouse cursor was broken (after I installed Guix) until I set this. * etc/guix-install.sh (sys_create_init_profile): Set default value for XCURSOR_PATH. Change-Id: I489f0307d99e4d8d82671f291c78b90c7b6dae4a Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2024-04-07guix-install.sh: Make Guix modules available too.Janneke Nieuwenhuizen * etc/guix-install.sh (GUILE_LOAD_PATH): Prepend directory to current Guix modules. (GUILE_LOAD_COMPILED_PATH): Likewise to compiled modules. Change-Id: I0b2722a38b1f8ebab32142cbc372a23cadfb0620 2024-04-05guix-install.sh: Add ‘--uninstall’ flag.Ludovic Courtès * etc/guix-install.sh (REQUIRE): Add groupdel and userdel. (chk_term): Handle ‘WAR’. (sys_delete_store, sys_delete_build_user, sys_delete_guix_daemon) (sys_delete_init_profile, sys_delete_user_profiles): New functions. (main): Rename to… (main_install): … this. (main_uninstall): New function. (main): Dispatch between these two. * doc/guix.texi (Installation): Refer to “Binary Installation” instead of repeating it. (Binary Installation): Document uninstallation. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I55b7c10823773bced2e268273e8ce828cb3bd98d 2024-04-03Switch order of the default substitute servers.Christopher Baines The aim here is to improve the user experience. There's anecdotal evidence that the network performance for bordeaux is better compared to ci at least for some users, and I don't know of any issues with rate limiting or access restriction for bordeaux compared to ci. It also has IPv6 support. Additionally, bordeaux generally had more substitutes than ci, particularly for aarch64-linux and armhf-linux. This change will offer a very slight speedup for those substitutes that only bordeaux has. Bordeaux has been a default substitute server for nearly 3 years now and I think this change is overdue. I'm also hopeful that we'll be able to build on the testing regarding mirrors for bordeaux, and that'll allow potentially improving the hosting setup (through providing more redundancy) and further improving substitute fetching for users who currently have issues with substitute access. * config-daemon.ac: Switch substitute urls order. * doc/guix.texi: Ditto. * etc/guix-install.sh: Ditto. * gnu/installer/newt/network.scm (wait-service-online): Ditto. * guix/store.scm (%default-substitute-urls): Ditto. Change-Id: I4f6d93ae1fc8b03d80b47b18b5749a51f1fde17b Signed-off-by: Christopher Baines <mail@cbaines.net> 2023-07-16guix-install.sh: Fix incomplete installation.Tobias Geerinckx-Rice ‘false || return’ returns false, and ‘set -e’ aborts the script. This leaves Guix half installed with visual indication of error. * etc/guix-install.sh (sys_customize_bashrc, sys_maybe_setup_selinux): Explicitly return 0. 2023-07-16guix-install.sh: Install SELinux policy only if tools are present.Tobias Geerinckx-Rice * etc/guix-install.sh (sys_maybe_setup_selinux): Silently return if the ‘semodule’ or ‘restorecon’ commands are missing. 2023-07-09guix-install.sh: Remove any old systemd units first.Tobias Geerinckx-Rice Don't clobber /dev/null permissions if units are masked. * etc/guix-install.sh (sys_enable_guix_daemon): Factor out unit installation. Unconditionally remove any old units. Install and enable gnu-store.mount after guix-daemon.service. 2023-07-09guix-install.sh: Don't patch guix-daemon.service.Tobias Geerinckx-Rice * etc/guix-install.sh (sys_enable_guix_daemon): Remove obsolete sed invocations. 2023-07-09guix-install.sh: Unconditionally install gnu-store.mount.Tobias Geerinckx-Rice * etc/guix-install.sh (sys_enable_guix_daemon): Remove obsolete conditional. 2023-07-05guix-install.sh: Don't extract the binary ‘.’.Tobias Geerinckx-Rice * etc/guix-install.sh (sys_create_store): Strip the first tar file name component. 2023-05-25guix-install.sh: Install SELinux policy and relabel file systems if needed.Ludovic Courtès Fixes <https://issues.guix.gnu.org/62487>. * etc/guix-install.sh (sys_maybe_setup_selinux): New function. (main): Use it. 2023-04-24guix-install.sh: Fix GUIX_ALLOW_OVERWRITE condition.Maxim Cournoyer Before this change, the "Overwriting existing installation!" would be displayed erroneously. * etc/guix-install.sh (sys_create_store): Fix overwrite conditional. 2023-04-09guix-install.sh: Source both profiles, default user's and home.Andrew Tropin * etc/guix-install.sh (sys_create_init_profile): Source both profiles, default user's and home. 2023-02-17guix-install.sh: Add GUIX_ALLOW_OVERWRITE environment variable.Maxim Cournoyer The need for this use case appeared when attempting to install Guix on a truly minimal image made with Buildroot, which lacked enough GNU components that I had to extract a guix pack to /gnu before attempting installation, which would then refuse to proceed because of the existing /gnu. * etc/guix-install.sh: Document environment variables. (sys_create_store) [GUIX_ALLOW_OVERWRITE]: Skip pre-existing installation checks and output a warning. Extract the tarball directly to /. 2022-12-16guix-install.sh: Directly exit in case of errors in chk_require.Maxim Cournoyer * etc/guix-install.sh (chk_require): Directly exit in case of errors in chk_require, instead of relying on 'set -e'. 2022-12-16guix-install.sh: Add missing "useradd" command.Maxim Cournoyer * etc/guix-install.sh: (REQUIRE): Add missing "useradd" command. 2022-12-11guix-install.sh: Gracefully fail on | bash.Tobias Geerinckx-Rice * etc/guix-install.sh (welcome): Print an error message and a hint if the first read fails. 2022-12-09guix-install.sh: Authorize all project build farms at once.Tobias Geerinckx-Rice * etc/guix-install.sh (sys_authorize_build_farms): Iterate over all hosts. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2022-11-16guix-install.sh: Expand mktemp template for busybox compatibility.Maxim Cournoyer Fixes <https://issues.guix.gnu.org/58858>. * etc/guix-install.sh (main): Use 6 'X' characters in the template, as this is the minimum required by Busybox's mktemp (which matches glibc's mktemp behavior). Reported-by: conses <contact@conses.eu> 2022-11-14guix-install.sh: Remove unnecessary XDG_DATA_DIRS export.Prafulla Giri This started out as a bug-fix for a GUI login loop that was resulting from XDG_DATA_DIRS not including any of the host distro's directories. The solution was to export the vari- able (with fail-safe defaults) before source-ing GUIX_PROFILE/etc/profile. It turns out changes have already been made to ensure that XDG_DATA_DIRS, etc. are always exported before anything guix-specific. So, this export is no longer necessary. For reference, the aforementioned bug was found on a Debian 11 machine and it's guix.sh init profile for guix version 1.2. * etc/guix-install.sh (sys_create_init_profile): Remove unnecessary XDG_DATA_DIRS export. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> 2022-11-08guix-install.sh: Run guix.sh script in /etc/profile.d last.Konrad Hinsen * etc/guix-install.sh: Rename /etc/profile.d/guix.sh to zzz-guix.sh. This script refers to environment variables set by the host distribution. They may be set in other scripts in /etc/profile.d, which must therefore be run first. Example: in Ubuntu 20.04, XDG_DATA_DIRS is set in /etc/profile.d/xdg_dirs_desktop_session.sh Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-10-16guix-install.sh: Cosmetically tweak non-interactive output.Tobias Geerinckx-Rice Avoid printing Press return to continue...[1666352494.051]: Starting installation… [1666352648.869]: … when the return itself wasn't echoed on the console. * etc/guix-install.sh (welcome): Add a carriage return to the prompt, so that the next line of output may overwrite it. 2022-10-16guix-install.sh: Warn if we suspect dodgy automation.Tobias Geerinckx-Rice This doesn't affect the installation (yet), but reserves the right to default to safe values other than ‘y’ in future. * etc/guix-install.sh (welcome): Warn if the ‘return’ wasn't. 2022-10-16guix-install.sh: Treat all uncaught errors as fatal.Tobias Geerinckx-Rice * etc/guix-install.sh: Set -o pipefail. 2022-10-16guix-install.sh: Suggest what to do if fetching OpenPGP key(s) fails.Tobias Geerinckx-Rice * etc/guix-install.sh (chk_gpg_keyring): Report an _err and set the exit_flag if wget | gpg --import fails. 2022-10-16guix-install.sh: Time out fetching OpenPGP keys.Tobias Geerinckx-Rice The default 900s provide no useful backstop in interactive use. * etc/guix-install.sh (chk_gpg_keyring): Add a 30s wget --timeout. 2022-10-11guix-install.sh: Restore compatibility with "yes" invocation.Maxim Cournoyer Commit 6a2e303d3a had modified prompt_yes_no to only read a single character, aiming to ease the user experience. This was, in retrospect, a bad idea, as it makes user input error more likely and introduces complexity. This commit reverts to line-oriented input, while preserving the default yes value so that a user can simply hit 'Enter' at the prompt in place of typing "yes". * etc/guix-install.sh (_flush): Delete function. (prompt_yes_no): Restore line-oriented read. Remove loop. Make anything else than yes means no. Use Bash features to streamline definition. Reported-by: Lars-Dominik Braun <lars@6xq.net> and others. 2022-10-07guix-install.sh: Add Bash prompt customization option.Maxim Cournoyer Fixes <https://issues.guix.gnu.org/55484>. * etc/guix-install.sh (sys_customize_bashrc): New function. (main): Use it. 2022-10-07guix-install.sh: Introduce 'die' utility function.Maxim Cournoyer * etc/guix-install.sh (die): New function. (chk_sys_arch): Use it. (guix_get_bin_list, guix_get_bin, sys_create_store): Likewise. 2022-10-07guix-install.sh: Improve prompt_yes_no procedure.Maxim Cournoyer * etc/guix-install.sh (_flush): New function. (prompt_yes_no): Clear input, then only read the first character, silently. Add the [Yes/no] string to the message. When a newline is entered by the user, treat it as the default value, which is "yes". (chk_gpg_keyring): Remove "(yes/no)" from the prompt message. (configure_substitute_discovery): Likewise. (sys_authorize_build_farms): Likewise. 2022-07-04etc/guix-install.sh: Check for profile from 'guix home'.Philip McGrath If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of "$HOME/.guix-profile". * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home' profile. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2022-07-04etc/guix-install.sh: Initialize XDG base directories.Philip McGrath The default values from the XDG base directory specification make little sense for Guix System, and some scripts in Guix assume that they are not "empty or unset": for example, see <https://issues.guix.gnu.org/56050>. On foreign distros, however, omitting the default values is likely to break software from the distro, perhaps even preventing the desktop environment from starting. To smooth over the difference, use the system-wide configuration to ensure the environment variables are always explicitly set on foreign distros. * etc/guix-install.sh (sys_create_init_profile): Explicitly initialize XDG base directory variables. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2021-11-07guix-install.sh: Undo some bugs introduced by shellcheck.Tobias Geerinckx-Rice * etc/guix-install.sh: Unquote all file names containing ~root.