unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Divya Ranjan <divya@subvertising.org>
Cc: 74432@debbugs.gnu.org
Subject: [bug#74432] [rust-team 9/9] gnu: rust-apps: Add blue-recorder
Date: Tue, 19 Nov 2024 11:57:38 +0200	[thread overview]
Message-ID: <ZzxhEmfLNOuMIU2F@3900XT> (raw)
In-Reply-To: <20241119073222.22383-11-divya@subvertising.org>


[-- Attachment #1.1: Type: text/plain, Size: 325 bytes --]

I was unable to build this package, but I made some changes to it and
I'm sending back what I currently have.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: 0001-gnu-Add-blue-recorder.patch --]
[-- Type: text/plain, Size: 8063 bytes --]

From bff03992bdb1a77f860773f348823837f373788b Mon Sep 17 00:00:00 2001
Message-ID: <bff03992bdb1a77f860773f348823837f373788b.1732010097.git.efraim@flashner.co.il>
From: Divya Ranjan <divya@subvertising.org>
Date: Tue, 19 Nov 2024 07:32:17 +0000
Subject: [PATCH] gnu: Add blue-recorder.

* gnu/packages/rust-apps.scm (blue-recorder): New variable.

Change-Id: Ic282f69fa2b5b4ffce938d106961c4df5e491cd3
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
 gnu/packages/rust-apps.scm | 104 +++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 303fe44995e..2b368924730 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -80,8 +80,10 @@ (define-module (gnu packages rust-apps)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages ibus)
   #:use-module (gnu packages icu4c)
@@ -105,6 +107,7 @@ (define-module (gnu packages rust-apps)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages webkit)
   #:use-module (gnu packages xorg))
 
@@ -366,6 +369,107 @@ (define-public bat
 paging.")
     (license (list license:expat license:asl2.0))))
 
+(define-public blue-recorder
+  ;; Tagged releases are infrequent.
+  (let ((commit "1cfa3bbb1b5ea845b3e4c51eba269745f0c3e271")
+        (revision "1"))
+    (package
+      (name "blue-recorder")
+      (version (git-version "0.2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/xlmnxp/blue-recorder")
+               (commit commit)))
+         (snippet
+          #~(begin (use-modules (guix build utils))
+                   (substitute* "Cargo.toml"
+                     (("gdk = \\{ git =.*\\}")
+                      "gdk = { version = \"0.7.3\", package = \"gdk4\" }"))))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0fz5l1z5rq8gx2vhrpfnf5l5karlqa7m8fdwx7ixlvy5klywwa5y"))))
+      (build-system cargo-build-system)
+      (arguments
+       `(;#:cargo-build-flags '("--release")
+         #:install-source? #t   ; Needed to wrap the binary.
+         #:phases
+         ,#~(modify-phases %standard-phases
+              ;; As per the application’s build instructions the binary needs
+              ;; to be wrapped with po and data paths as environment variables.
+              (add-after 'install 'wrap-paths
+                (lambda _
+                  (let* ((bin (string-append #$output "/bin"))
+                         (name-version (string-append #$name "-" #$version))
+                         (blue-recorder (string-append bin "/blue-recorder"))
+                         (src (string-append #$output "/share/cargo/src/"))
+                         (po (string-append src name-version "/po/"))
+                         (data (string-append src name-version "/data/")))
+                    (wrap-program blue-recorder
+                      `("PO_DIR" prefix (,po))
+                      `("DATA_DIR" prefix (,data))))))
+              (add-after 'unpack 'substitute-package-paths
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (define* (substitute-command-block* file command full-command)
+                    (substitute* file
+                      (((string-append "Command::new\\(\"" command "\"\\)"))
+                       (string-append "Command::new(\"" full-command "\")"))))
+                  (substitute-command-block* "src/area_capture.rs"
+                    "xwininfo" (search-input-file inputs "/bin/xwininfo"))
+                  (substitute-command-block* "src/ffmpeg_interface.rs"
+                    "ffmpeg" (search-input-file inputs "/bin/ffmpeg"))
+                  (substitute-command-block* "src/ffmpeg_interface.rs"
+                    "kill" (search-input-file inputs "/bin/kill"))
+                  (substitute-command-block* "src/ffmpeg_interface.rs"
+                    "mv" (search-input-file inputs "/bin/mv"))
+                  (substitute-command-block* "src/ffmpeg_interface.rs"
+                    "xdg-open" (search-input-file inputs "/bin/xdg-open"))
+                  (substitute-command-block* "src/main.rs"
+                    "pactl" (search-input-file inputs "/bin/pactl"))
+                  (substitute-command-block* "src/main.rs"
+                    "grep" (search-input-file inputs "/bin/grep")))))
+         #:cargo-inputs (("rust-async-std" ,rust-async-std-1)
+                         ("rust-chrono" ,rust-chrono-0.4)
+                         ("rust-dark-light" ,rust-dark-light-1)
+                         ("rust-dirs" ,rust-dirs-4)
+                         ("rust-filename" ,rust-filename-0.1)
+                         ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.9)
+                         ("rust-gdk4" ,rust-gdk4-0.7)
+                         ("rust-gettext-rs" ,rust-gettext-rs-0.7)
+                         ("rust-gio" ,rust-gio-0.15)
+                         ("rust-glib" ,rust-glib-0.10)
+                         ("rust-gstreamer" ,rust-gstreamer-0.20)
+                         ;("rust-gtk-sys" ,rust-gtk-sys-0.15)
+                         ;("rust-gtk4" ,rust-gtk4-0.4)
+                         ("rust-regex" ,rust-regex-1)
+                         ;("rust-rust-ini" ,rust-rust-ini-0.16)
+                         ("rust-secfmt" ,rust-secfmt-0.1)
+                         ("rust-subprocess" ,rust-subprocess-0.2)
+                         ("rust-tempfile" ,rust-tempfile-3)
+                         ("rust-zbus" ,rust-zbus-3))))
+      (native-inputs (list pkg-config
+                           gettext-minimal))
+      (inputs (list bash-minimal
+                    ;cairo
+                    coreutils-minimal
+                    ffmpeg
+                    ;gdk-pixbuf
+                    ;glib
+                    ;gstreamer
+                    ;gtk
+                    ;libappindicator
+                    pulseaudio
+                    xdg-utils
+                    xwininfo))
+      (home-page "https://github.com/xlmnxp/blue-recorder/")
+      (synopsis "Simple Screen Recorder written in Rust based on Green Recorder")
+      (description
+       "A desktop recorder built using GTK4 and ffmpeg.  It supports recording
+audio and video on almost all Linux interfaces with support for Wayland display
+server on GNOME session.")
+      (license license:gpl3))))
+
 (define-public cargo-machete
   (package
     (name "cargo-machete")

base-commit: 406a07e84984a97a078d142a7deda04a75474e90
prerequisite-patch-id: 5528ac34a2e9edbb4551fe61741e67446cfaff1c
prerequisite-patch-id: c2b361484623db22fa104a33e7d59fa8aed259e8
prerequisite-patch-id: 910a312afd5d003e1b9591ff30b59f47278446fc
prerequisite-patch-id: 5fb0c1e3aa96b1adf0fd775e9ded8e11e25ca1a0
prerequisite-patch-id: d5a3482cbeeb58f664c6ff0b9c0af5083582d6f6
prerequisite-patch-id: 2cf976884dc74e65c91ccea8ca6e0dc232dbc75c
prerequisite-patch-id: d27004116348a6b66b80db84c0d1bd0c417b6f99
prerequisite-patch-id: e6b57f9e8d22465c670d35dbe1682b740a4faaa3
prerequisite-patch-id: 0b4fc99585afa49b0b26d3a493d1307710b8a0a5
prerequisite-patch-id: 01982f6adcd279ec2fe77dea8e508849607f8bea
prerequisite-patch-id: bb31aceb5f2a598c7298149f70d22146dfa44c18
-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-11-19  9:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19  7:26 [bug#74432] [rust-team 0/9] Adding blue-recorder Divya Ranjan via Guix-patches via
2024-11-19  7:32 ` [bug#74432] [rust-team 1/9] gnu: crates-graphics: Add rust-dark-light Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 2/9] gnu: crates-gtk: rust-atk-sys: Update to 0.18 Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 3/9] gnu: crates-gtk: rust-gdk-sys: " Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 4/9] gnu: crates-gtk: rust-gtk-sys: " Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 5/9] gnu: crates-io: Add rust-dconf-rs Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 6/9] gnu: crates-io: Add rust-detect-desktop-environment Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 7/9] gnu: crates-io: Add rust-filename Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 8/9] gnu: crates-io: Add rust-secfmt Divya Ranjan via Guix-patches via
2024-11-19  7:32   ` [bug#74432] [rust-team 9/9] gnu: rust-apps: Add blue-recorder Divya Ranjan via Guix-patches via
2024-11-19  9:57     ` Efraim Flashner [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=ZzxhEmfLNOuMIU2F@3900XT \
    --to=efraim@flashner.co.il \
    --cc=74432@debbugs.gnu.org \
    --cc=divya@subvertising.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).