From patchwork Wed Jul 27 23:43:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joeke de Graaf X-Patchwork-Id: 4085 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 1EF2F27BBEA; Thu, 28 Jul 2022 00:44:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 7C26627BBE9 for ; Thu, 28 Jul 2022 00:44:12 +0100 (BST) Received: from localhost ([::1]:58800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGqhH-0008PG-KI for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 19:44:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGqh8-0008P8-MJ for guix-patches@gnu.org; Wed, 27 Jul 2022 19:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGqh8-0006cQ-5V for guix-patches@gnu.org; Wed, 27 Jul 2022 19:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGqh7-000610-Vr for guix-patches@gnu.org; Wed, 27 Jul 2022 19:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56668] [PATCH] gnu: Add wavbreaker References: <87r12gj8bt.fsf@bolo-santosi.mail-host-address-is-not-set> In-Reply-To: <87r12gj8bt.fsf@bolo-santosi.mail-host-address-is-not-set> Resent-From: Joeke de Graaf Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 23:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56668 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56668@debbugs.gnu.org Received: via spool by 56668-submit@debbugs.gnu.org id=B56668.165896543023090 (code B ref 56668); Wed, 27 Jul 2022 23:44:01 +0000 Received: (at 56668) by debbugs.gnu.org; 27 Jul 2022 23:43:50 +0000 Received: from localhost ([127.0.0.1]:57208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGqgw-00060K-1r for submit@debbugs.gnu.org; Wed, 27 Jul 2022 19:43:50 -0400 Received: from mout01.posteo.de ([185.67.36.65]:46305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGqgr-000605-I2 for 56668@debbugs.gnu.org; Wed, 27 Jul 2022 19:43:48 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 80C2E240026 for <56668@debbugs.gnu.org>; Thu, 28 Jul 2022 01:43:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658965419; bh=QiB/9ISAbiK7Y3TG0+msK5qfFjxrUj+BCeSyF33b7Zw=; h=Date:From:To:Subject:From; b=i3s8XiGqxI/0qJEA136iGk6aLV7pp8/99dEsyZHFCcM3DUuUVxwxrU4ygf8XLFg+p YTLwf5BJESSbmWkm/Yj3wAKdO5mxV+E5OnNv+kelJb+8hpjJ4myEogoJkHyvl8rQME Q8Y0cOKUoJv9piyLK+P3H2MPjjGYmRLa2XGdoMMCfIgkFY5eQ9qxhBE/Wdm01JfhV/ 62OQwg9SPrzxEyw2jPekBKnONzfiWKFcpr98kEqHQP6jlIRpl2tccQgZ/zYPI0pxhR sgZuffAKdjznyL4Ro4Veg5H/pEP5X9TCrmtqqMyhT1ijIBHn41/pjXT4B3sWSuN5er IWxOU1G6vK+dw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LtVj65bCjz9rxY for <56668@debbugs.gnu.org>; Thu, 28 Jul 2022 01:43:38 +0200 (CEST) MIME-Version: 1.0 Date: Wed, 27 Jul 2022 23:43:38 +0000 From: Joeke de Graaf Message-ID: <714ebc67b8a09e7f37fdd51c1e83c018@posteo.net> 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" X-getmail-retrieved-from-mailbox: Patches I've modified my patch to make wavbreaker work in pure environments. The only thing I haven't been able to fix is the program's own icon in Gnome's activity overview (the overview of open programs one gets when one presses the super key). If wavbreaker is run in a pure environment, this icon does not show up. Otherwise, the program seems to run fine. Best regards, Joeke de Graaf diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index 4a8bdad711..35343a80d4 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Simon Streit ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2022 Joeke de Graaf ;;; ;;; This file is part of GNU Guix. ;;; @@ -50,13 +51,17 @@ (define-module (gnu packages mp3) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages linux) ;alsa-lib #:use-module (gnu packages video) ;ffmpeg + #:use-module (gnu packages cmake) + #:use-module (gnu packages bash) + #:use-module (gnu packages gnome) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system python) - #:use-module (guix build-system cmake)) + #:use-module (guix build-system cmake) + #:use-module (guix build-system-meson)) (define-public libmad (package @@ -710,3 +715,61 @@ (define-public python-pytaglib cross-platform, works with all Python versions, and is very simple to use yet fully featured.") (license license:gpl3))) + +(define-public wavbreaker + (package + (name "wavbreaker") + (version "0.15") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/thp/wavbreaker/") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j")))) + (build-system meson-build-system) + (native-inputs + (list pkg-config cmake)) + (arguments + '(#:modules + ((guix build utils) + (guix build meson-build-system)) + + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-program + ;; This wrapping is necessary to make wavbreaker find things it needs in pure environments + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (adwaita-icons (assoc-ref inputs "adwaita-icon-theme")) + (hicolor-icons (assoc-ref inputs "hicolor-icon-theme")) + (shared-mime (assoc-ref inputs "shared-mime-info"))) + (wrap-program (string-append out "/bin/wavbreaker") + ;; Needed in order for wavbreakere to find the icons it needs + `("XDG_DATA_DIRS" ":" prefix ,(map (lambda (package) + (string-append package + "/share")) + `(,out ;; For wavbreaker's icon + ,adwaita-icons + ,hicolor-icons + ,shared-mime))) + ;; This is necessary to load some pixbufs like Adwaita's check-symbolic.svg + ;; and wavbreaker's own logo in the 'about' section + `("GDK_PIXBUF_MODULE_FILE" = + (,(getenv "GDK_PIXBUF_MODULE_FILE"))) + ;; Needed for GTK's file chooser to not crash + `("GSETTINGS_SCHEMA_DIR" = + (,(string-append (assoc-ref inputs "gtk+") + "/share/glib-2.0/schemas")))))))))) + (inputs (list glib gtk+ ao bash-minimal adwaita-icon-theme shared-mime-info hicolor-icon-theme gsettings-desktop-schemas)) + (home-page "https://wavbreaker.sourceforge.io/") + (synopsis "WAV and MP3 file splitter with a GUI") + (description + "Wavbreaker is a WAV and MP3 file splitter. It can be used to + break up a WAV or MP3 audio file into multiple WAV files. + Wavbreaker contains a helpful waveform display of the audio file + being edited, to help the user in splitting the file at the right + point. Wavbreaker also supports splitting MP3 files without + re-encoding them, to preserve their original audio quality.") + (license license:gpl2+)))