all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Roman Scherer <roman@burningswell.com>
To: 74120@debbugs.gnu.org
Cc: Roman Scherer <roman@burningswell.com>,
	Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#74120] [PATCH v2] gnu: Add rust-speakersafetyd-1.
Date: Wed,  6 Nov 2024 18:08:42 +0100	[thread overview]
Message-ID: <b1cad06d9c0f23aa5f6d6cffc3e6e26375a38f60.1730912852.git.roman@burningswell.com> (raw)
In-Reply-To: <730badd0c62c83b9c779ee2ad9c9ca41af34bfd9.1730317218.git.roman@burningswell.com>

* gnu/packages/crates-io.scm (rust-speakersafetyd-1): New variable.

Change-Id: I02eb6e0c23fd04cff86b67ed30e8867af07a724b
---
 gnu/packages/crates-io.scm | 52 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c08ccd29fd..22b28e0845 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -73271,6 +73271,58 @@ (define-public rust-sourcemap-6
     (description "This package provides basic sourcemap handling for Rust.")
     (license license:bsd-3)))
 
+(define-public rust-speakersafetyd-1
+  (package
+    (name "rust-speakersafetyd")
+    (version "1.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "speakersafetyd" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1dvyj194niz5i4rldsqvjmz8j7df9w9qpvf9rwg3vsnzc2mjh0zg"))))
+    (build-system cargo-build-system)
+    (arguments
+     (list
+      #:cargo-inputs `(("rust-alsa" ,rust-alsa-0.8)
+                       ("rust-chrono" ,rust-chrono-0.4)
+                       ("rust-clap" ,rust-clap-4)
+                       ("rust-clap-verbosity-flag" ,rust-clap-verbosity-flag-2)
+                       ("rust-configparser" ,rust-configparser-3)
+                       ("rust-json" ,rust-json-0.12)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-log" ,rust-log-0.4)
+                       ("rust-signal-hook" ,rust-signal-hook-0.3)
+                       ("rust-simple-logger" ,rust-simple-logger-1))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-paths
+            (lambda _
+              (substitute* "src/main.rs"
+                (("/usr/local") #$output))))
+          (add-after 'unpack 'remove-systemd-udev-rules
+            (lambda _
+              (substitute* "95-speakersafetyd.rules"
+                ((".*SYSTEMD_WANTS.*") ""))))
+          (add-after 'install 'install-data
+            (lambda _
+              (setenv "BINDIR" (string-append #$output "/bin"))
+              (setenv "UNITDIR" (string-append #$output "/lib/systemd/system"))
+              (setenv "UDEVDIR" (string-append #$output "/lib/udev/rules.d"))
+              (setenv "TMPFILESDIR" (string-append #$output "/usr/lib/tmpfiles.d"))
+              (setenv "SHAREDIR" (string-append #$output "/usr/share"))
+              (setenv "VARDIR" (string-append #$output "/var"))
+              (invoke "make" "install-data"))))))
+    (inputs (list alsa-lib))
+    (native-inputs (list pkg-config))
+    (home-page "https://github.com/AsahiLinux/speakersafetyd/")
+    (synopsis "Speaker protection daemon")
+    (description "Speakersafetyd is a userspace daemon written in Rust that
+implements an analogue of the Texas Instruments Smart Amp speaker protection
+model.")
+    (license license:expat)))
+
 (define-public rust-special-0.8
   (package
     (name "rust-special")

base-commit: 54f82bcf22178d89140a131332a9e036ac386657
-- 
2.46.0





  parent reply	other threads:[~2024-11-06 17:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 19:41 [bug#74120] [PATCH] gnu: Add rust-speakersafetyd-1 Roman Scherer
2024-11-03 20:48 ` Nicolas Graves via Guix-patches via
2024-11-06 17:15   ` Roman Scherer
2024-11-06 17:08 ` Roman Scherer [this message]
2024-12-03 19:46   ` bug#74120: [PATCH v2] " Efraim Flashner
2024-12-04  7:55     ` [bug#74120] " Roman Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1cad06d9c0f23aa5f6d6cffc3e6e26375a38f60.1730912852.git.roman@burningswell.com \
    --to=roman@burningswell.com \
    --cc=74120@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.