[bug#79093] Add olc

Message ID 20250725104144.22409-1-ikbenrickhuyzer@gmail.com
State New
Headers
Series [bug#79093] Add olc |

Commit Message

Rick Huijzer July 25, 2025, 10:39 a.m. UTC
---
Please keep in mind that ola is currently broken. See issue, patch #79092
 gnu/packages/lighting.scm | 55 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)
  

Comments

Andreas Enge July 26, 2025, 5:02 p.m. UTC | #1
Hello Rick,

thanks for your contribution!

Am Fri, Jul 25, 2025 at 12:39:57PM +0200 schrieb Rick Huijzer:
> +(define-public olc
> +  (let ((commit "e8393295f4a656dab87cbd63b6be8faad48d4c1b"))
> +      (name "olc")
> +      (version "0.92.beta")
...
> +               (commit commit)))

This is not necessary, you can directly use the versions instead of the
commit (Guix understands git tags).

> +      (native-inputs `(("gettext" ,gettext-minimal)
> +                       ("glib:bin" ,glib "bin")
> +                       ("pkg-config" ,pkg-config)))

You do not need the input labels, but can also use a list of packages.
And for packages with separate outputs, you can use
   (list glib bin)
(this will end up as a nested list).

> +      (description
> +       "Open Lighting Console is an application for controlling lighting systems. It supports various protocols and devices.")

Try "./pre-inst-env guix lint", it should tell you that this line is too
long, for instance; and that we use two spaces between sentences.
Also, could this be expanded a bit?

Looking forward to a v2,

Andreas

PS: You might also consider moving to codeberg, where our main
    development takes place nowadays.
  

Patch

diff --git a/gnu/packages/lighting.scm b/gnu/packages/lighting.scm
index 4794400e6e..c9aac430eb 100644
--- a/gnu/packages/lighting.scm
+++ b/gnu/packages/lighting.scm
@@ -1,6 +1,7 @@ 
 ;;; 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>
+;;; Copyright © 2025 Rick Huijzer <ikbenrickhuyzer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,22 +20,30 @@ 
 
 (define-module (gnu packages lighting)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #: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 audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gnunet)
+  #:use-module (gnu packages gtk)
   #: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))
+  #:use-module (gnu packages protobuf)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-science)
+  #:use-module (gnu packages python-xyz))
 
 (define-public ola
   (package
@@ -83,3 +92,47 @@  (define-public ola
 DMX gateways.")
     (home-page "https://www.openlighting.org/ola")
     (license license:lgpl2.1+)))
+
+
+(define-public olc
+  (let ((commit "e8393295f4a656dab87cbd63b6be8faad48d4c1b"))
+    (package
+      (name "olc")
+      (version "0.92.beta")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/mikacousin/olc")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "02w1n5w12ylw14qvhm50576zcksw74saynfvn2gswc7hsggp32if"))))
+      (build-system meson-build-system)
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    ;; Add a phase to remove the meson.add_install_script line
+                    (add-before 'configure 'remove-install-script
+                      (lambda _
+                        (substitute* "meson.build"
+                          (("meson.add_install_script\\('build-aux/meson/postinstall.py'\\)")
+                           "")))))))
+      (propagated-inputs (list gtk+
+                               python-pygobject
+                               gobject-introspection
+                               ola
+                               python-sacn
+                               python-mido
+                               python-pycairo
+                               python-pyliblo
+                               python-scipy
+                               python-charset-normalizer))
+      (inputs (list python))
+      (native-inputs `(("gettext" ,gettext-minimal)
+                       ("glib:bin" ,glib "bin")
+                       ("pkg-config" ,pkg-config)))
+      (home-page "https://github.com/mikacousin/olc")
+      (synopsis "Open Lighting Console for controlling lighting systems")
+      (description
+       "Open Lighting Console is an application for controlling lighting systems. It supports various protocols and devices.")
+      (license license:gpl3))))