From patchwork Tue Nov 19 09:57:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 70590 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6FA8C27BBE9; Tue, 19 Nov 2024 09:59:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4600A27BBE2 for ; Tue, 19 Nov 2024 09:59:35 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDL0j-0004JA-Av; Tue, 19 Nov 2024 04:59:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDL0g-0004Ie-D5 for guix-patches@gnu.org; Tue, 19 Nov 2024 04:59:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDL0g-0006Ro-4j for guix-patches@gnu.org; Tue, 19 Nov 2024 04:59:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:MIME-Version:References:From:Date:To:Subject; bh=aIDHdsJ9AHeTsaWsc+1YyxinOoYJgdBPgRuQp9p/fic=; b=r+rk/2bXOA2b+X4ZWgB9ts+h9ie7hN2T7OpSAiEzjPK/7j/675IGU8G8I5vA372hg0gaqB3o0Ucm61NpQgOljVBHXpvO9lbygUV6qUZNONhgFZSkK8s6OHjrJBfFIZQVEKtA74IBj2PFJhGSGTz7TMYYHoQFNC5l8Gc7F8okzJzDBlSCA9jB2HmZ1PTEj0e2sr03g1YOOGQUSxKK0WyAqyr7Xj3Qm0TMvkz0xL2eSjRnYT1pGPf1vbng+6EHsdRwtscjhuN/RWt/JstPra97qaVaYCSIzhv4rPi6AziGq/21SZXdNCGuYcm9IJXXiUYpGQSUHCyWye1Fz5CXYSz9Bw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDL0f-0004zk-Uq for guix-patches@gnu.org; Tue, 19 Nov 2024 04:59:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74432] [rust-team 9/9] gnu: rust-apps: Add blue-recorder Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2024 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74432 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Divya Ranjan Cc: 74432@debbugs.gnu.org Received: via spool by 74432-submit@debbugs.gnu.org id=B74432.173201032519178 (code B ref 74432); Tue, 19 Nov 2024 09:59:01 +0000 Received: (at 74432) by debbugs.gnu.org; 19 Nov 2024 09:58:45 +0000 Received: from localhost ([127.0.0.1]:41125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDL0O-0004zG-R9 for submit@debbugs.gnu.org; Tue, 19 Nov 2024 04:58:45 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:48270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDL0M-0004z7-Da for 74432@debbugs.gnu.org; Tue, 19 Nov 2024 04:58:43 -0500 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4315e9e9642so34414185e9.0 for <74432@debbugs.gnu.org>; Tue, 19 Nov 2024 01:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732010261; x=1732615061; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=aIDHdsJ9AHeTsaWsc+1YyxinOoYJgdBPgRuQp9p/fic=; b=iWf+E27cBYoE/jIj1Icryu7fZPiSONXq2e0EyGOg57QKURHVc68MF+rtEfRvtE2HD9 724sk3PgYTT25hEEYjAy+bb4UVu/QRk0FnhFzf4kKDxFdLbBjU+Z5F3O/i3jN/BbbmZA TsXR27xrtnmnl8lWdDw5Eg/HxifZ0hGW2zbAW8iKp8/J+2EIzRy6tFokWzCvN75ZTC92 6F2kS+oOXEZQL0KECozXZrrOvqVj5tLHYaTzv7rxC2U2YAFvBR3rLZbqG454aKF7zfR/ wTLvXFk2X2vEzrineH1pbNcXfloij27E6CAfdQzqbQo5orf86bBiMgQrZvG6UJNsYSs3 ilrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732010261; x=1732615061; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aIDHdsJ9AHeTsaWsc+1YyxinOoYJgdBPgRuQp9p/fic=; b=Ijdr9mTbPRxP7syIxdtcgfM0WisaNnuU8UFX7EqNwAqMWxmwTokbqBqseCiLuwDJ2E Adi0wcEJhWgeODlIeV/JUiX2SWoszSm+9eXEV7btSidfUJOwwFW2JFIPwb/3stIbqgGa 4trO8NRNFoHC91EoprZViTnGX2iu9zP4xAZCCMA535l6g6zLsLDuN6VvniUCCFC4FvIa yociAIOfr3i/KVzbrgmfhV6uvQD3UWeh+DYRt/KQ96lucrSJ7lOtvAblS+U6cCAIF0Ut OjO3ZD6CB7JJ783ESjbMj6+mRUAEsucB7V23mu9Ol009aLit4Y257/pKsHQy4Exht7QQ 9xxQ== X-Gm-Message-State: AOJu0YxZIoVgakXFw+uxkp/FNbiM7IDE41wZBy66/ILdQCp6MS5tfpDr ryyRLc0Ui1KSeMQFb+rhdULRp43UQ7erBleGpRHkU01TmMfbPY16 X-Google-Smtp-Source: AGHT+IH2V5NMiMR8Z/3WBym/Ekxdis0KB06QO1aazAAbn4oRr+HqqYOxfOTrpLTQhv50uP195sDlJQ== X-Received: by 2002:a5d:64c8:0:b0:381:f604:3d55 with SMTP id ffacd0b85a97d-38225aaf59cmr12510198f8f.52.1732010261285; Tue, 19 Nov 2024 01:57:41 -0800 (PST) Received: from localhost ([188.120.129.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3821ada3e65sm15249767f8f.13.2024.11.19.01.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2024 01:57:40 -0800 (PST) Date: Tue, 19 Nov 2024 11:57:38 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Divya Ranjan , 74432@debbugs.gnu.org References: <20241119073222.22383-2-divya@subvertising.org> <20241119073222.22383-11-divya@subvertising.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20241119073222.22383-11-divya@subvertising.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches I was unable to build this package, but I made some changes to it and I'm sending back what I currently have. 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")