From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +M9dIEdd8GNneAAAbAwnHQ (envelope-from ) for ; Sat, 18 Feb 2023 06:08:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cMlGIEdd8GOv7AAAauVa8A (envelope-from ) for ; Sat, 18 Feb 2023 06:08:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 09AD82912 for ; Sat, 18 Feb 2023 06:08:22 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=jEAhXvxw; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=a0ySYZ4V; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676696903; a=rsa-sha256; cv=none; b=REDczoYwtCnPlNASuYlFgRnMOb30zEzIUK1CjWTIYUmFCj7xSz8OCrMv4F1cCyPcfr1LVT hRYr5fxxB6LDxEa1ikqK6nIljzGSUc3xAAFVeGq01E32DwL654o/0qjG7eboUT0JfHgc7S zt3HCuwDPadu5ap4/Sh12lxSiqUGtHPHnk4VuGy9iLOFTGYgVDSStWDvF+I9Sv1ohD1DWt zuVJBxijWdCG1e9PFya8x9EFsRr8xx51u3XD+5HOq69HleHOW8KB9Sl9sBbhMsvrrwaHI1 nme6RtCrGxqS3/IvdipNImkKdVRHw88W6CdztM0YOrwpVfa1bX6vkmNxWzZmig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=jEAhXvxw; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=a0ySYZ4V; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676696903; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=MQaRwzhax2PH3Klt0ZrhD691WdAyXZgKWf4iocBZFpY=; b=H/5ymR7n0Giu2McJUTPJFyXJkwTaq22bXHZTvv5N9AafeQqtmQiy4RQQe1QD8cvSB8zUer KuZeukT8/Xezf7cbiiOKF8qKMI+vKW55PSAY7A422+mEIiy8ZyhiImMmqfVRbo/SogatBc 4fSiaZvhCzQa1UuJ4ztl70csh0LD/kAuCBFcHuPFrzp5aWvPQD5kDFrWUUQgVNINChfFbz XHofKBrTm36ViuTvYnnFyAVR9w44qEE7MZpEttgvj0YbuB8QMk4dmNLn6LZUwHC5rBy8BH kRG8W/MU7XR0k8L96jeGxHOqywUbfOm4oCxOA7Omi4CKHLb0QA4sjVO5cdi/2Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTFS9-0001zD-Kw; Sat, 18 Feb 2023 00:08: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 1pTFS7-0001z3-Es for guix-patches@gnu.org; Sat, 18 Feb 2023 00:08:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTFS7-0002OA-6P for guix-patches@gnu.org; Sat, 18 Feb 2023 00:08:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTFS6-0006mb-Ii for guix-patches@gnu.org; Sat, 18 Feb 2023 00:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61594] [PATCH][WIP] gnu: Add norns. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Feb 2023 05:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61594 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61594@debbugs.gnu.org Cc: Antero Mejr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167669683626002 (code B ref -1); Sat, 18 Feb 2023 05:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Feb 2023 05:07:16 +0000 Received: from localhost ([127.0.0.1]:42166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTFRM-0006lJ-5w for submit@debbugs.gnu.org; Sat, 18 Feb 2023 00:07:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:43030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTFRK-0006lC-56 for submit@debbugs.gnu.org; Sat, 18 Feb 2023 00:07:14 -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 1pTFRJ-0001vH-UA for guix-patches@gnu.org; Sat, 18 Feb 2023 00:07:13 -0500 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pTFRG-0002FJ-Of for guix-patches@gnu.org; Sat, 18 Feb 2023 00:07:13 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PJc9g5KQYz9sRH for ; Sat, 18 Feb 2023 06:07:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1676696823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MQaRwzhax2PH3Klt0ZrhD691WdAyXZgKWf4iocBZFpY=; b=jEAhXvxwy+/7vkMYsUKPdBxtrrAc2SIELDBsiVQIduVjCAb1Xm7jmFCfZBN72yEmTnRoYt h2OUlau0IIYCsBP7/K/TPeJx93fnxU7DBErjB2e/dAxTcitpmqi5b/wB+UZYqZZq+QyxhH vptt5ZQfdsO50Zg1e+M8qD2qGKXJh/+2VcoqA/sOS5x3+yKSdPL9jo3homMrshLsSZKoBB LZOqXqNbdAR/h9+hj3Xs8lioBepnLkZbFHryrocnUwjTf6/MGZeXWZ6fU1zs5Dzg+kFUzM rfzkUQeuuMvXMIJPMdKcsGqn2SfDHo0CfynvOciBx6cnLRCg3OnmpA3oCY2Hng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1676696821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MQaRwzhax2PH3Klt0ZrhD691WdAyXZgKWf4iocBZFpY=; b=a0ySYZ4VOSM/YexTYEVcsC1m+Is3Q4/5gqzqnreGKRwOsi2w4iwXvSvIE5usjZ1ldy9hZp KoXc4GECmyX7dAhkVletkxHdW3vtWlwXK0IQ6ptMPKvcWmEviasQwo9UPdEJmsvCepIGDd tju/hwYl06GGcHAsYslD5aHc5OWoFpHjJ/Bx7mGTAhqoxVEkopaD3hQLtNvUxf7Bxh/w6n eBmkmjGjSLrEukQpTdzvqVYO1pz7nKe3K6go4LTPy9EH1Y4orxOQaOq6gISTnE/IT0kmpK tBB8IqXjMKh7F7Q6BEKMA6JGvnnG2bXuAQ1EtARyJUZHP/QbxLT3E3Mm5w1sqA== Date: Sat, 18 Feb 2023 05:05:10 +0000 Message-Id: <20230218050509.7723-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: a486feccc8cb5505d45 X-MBO-RS-META: 7u85aztkwwz557p79d7b78b1mum5onfd X-Rspamd-Queue-Id: 4PJc9g5KQYz9sRH Received-SPF: pass client-ip=2001:67c:2050:0:465::101; envelope-from=antero@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Antero Mejr X-Migadu-Queue-Id: 09AD82912 X-Spam-Score: -2.43 X-Migadu-Spam-Score: -2.43 X-Migadu-Scanner: scn0.migadu.com X-ACL-Warn: , Antero Mejr via Guix-patches From: Antero Mejr via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: NealmzFnHGTR * gnu/packages/music.scm (norns): New variable. --- Launches OK, can't fully test because Supercollider/Jack don't work on my machine currently. I will try to report back with test results and/or a V2 patch, but not sure when that will happen. Please apply the libmonome patch first when everything is ready. gnu/local.mk | 1 + gnu/packages/music.scm | 109 ++++++++++++++++++ .../patches/norns-remove-nonfree-fonts.patch | 41 +++++++ 3 files changed, 151 insertions(+) create mode 100644 gnu/packages/patches/norns-remove-nonfree-fonts.patch diff --git a/gnu/local.mk b/gnu/local.mk index aaf125ce7b..4f6ce69e85 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1579,6 +1579,7 @@ dist_patch_DATA = \ %D%/packages/patches/network-manager-meson.patch \ %D%/packages/patches/nginx-socket-cloexec.patch \ %D%/packages/patches/nnpack-system-libraries.patch \ + %D%/packages/patches/norns-remove-nonfree-fonts.patch \ %D%/packages/patches/nsis-env-passthru.patch \ %D%/packages/patches/nss-getcwd-nonnull.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 7f0e9dd793..9de4faca32 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -95,6 +95,7 @@ (define-module (gnu packages music) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages assembly) + #:use-module (gnu packages avahi) #:use-module (gnu packages backup) #:use-module (gnu packages base) ;libbdf #:use-module (gnu packages bash) @@ -151,6 +152,7 @@ (define-module (gnu packages music) #:use-module (gnu packages mpd) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) + #:use-module (gnu packages networking) #:use-module (gnu packages pcre) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) @@ -7115,6 +7117,113 @@ (define-public libmonome FFI.") (license license:isc))) +(define-public norns + (package + (name "norns") + (version "2.7.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/monome/norns") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (patches (search-patches + "norns-remove-nonfree-fonts.patch")) + (modules '((guix build utils))) + (snippet #~(begin (delete-file-recursively "third-party") + (delete-file "sc/install.sh") ;do this manually + (for-each delete-file ;remove non-free vera font + (find-files "resources" "[V|v]era*")) + (substitute* "wscript" + (("'VERSION_HASH', get_version_hash\\(\\)") + "'VERSION_HASH', ''") + (("lua53") "lua-5.3") + (("bld\\.recurse\\('third-party'\\)") "")) + (substitute* "matron/wscript" + (("matron_libs = \\[") + "matron_libs = ['lua', 'abl_link',")) + (substitute* "matronrc.lua" ;run SDL version + (("-- _boot\\.add_io\\('input:sdl', \\{\\}\\)") + "_boot.add_io('input:sdl', {})") + (("^init_norns") + "init_desktop")))) + (sha256 + (base32 "1y8hiy0dlv7c66q874znfsgl0ndlddfm81dgyvd5rz8f8g8iqavp")))) + (build-system waf-build-system) + (arguments + (list #:tests? #f ;no target + #:configure-flags #~(list "--desktop") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-src + (lambda _ + (substitute* "sc/norns-config.sc" + (("Platform\\.userHomeDir") + (string-append #$output "/share/norns/sc"))) + (substitute* "matron/src/hardware/screen.c" + (("%s/norns/resources/%s\", getenv\\(\"HOME\"\\),") + (string-append + #$output "/share/norns/resources/%s\","))) + (substitute* "matron/wscript" + (("\\.\\./third-party/link/extensions/abl_link/include") + (string-append + #$(this-package-input "ableton-link") + "/include/extensions/abl_link"))))) + (add-before 'build 'set-desktop-env + (lambda _ + (setenv "NORNS_DESKTOP" "true"))) + (add-after 'install 'install-resources + (lambda _ + (let ((scdir (string-append + #$output "/share/norns/sc")) + (fontdir (string-append + #$output "/share/norns/resources"))) + (mkdir-p scdir) + (copy-recursively "sc" scdir) + (mkdir-p fontdir) + (copy-recursively "resources" fontdir) + (install-file + "matronrc.lua" + (string-append #$output "/share/norns"))))) + (add-after 'install 'install-docs + (lambda _ + ;; TODO: build docs using ldoc, luarocks + (copy-recursively "doc" (string-append + #$output "/share/doc"))))))) + (native-inputs (list pkg-config)) + (inputs (list ableton-link + alsa-lib + avahi + cairo + eudev + jack-2 + libevdev + liblo + libmonome + libsndfile + lua + nanomsg + ncurses + readline + sdl2)) + (home-page "https://monome.org/docs/norns/") + (synopsis "Desktop version of the norns sound computer") + (description "The package provides a SDL implementation of norns, the sound +computer that dynamically runs scripts and +@acronym{DSP, Digital Signal Processors}, such as: +@itemize +@item sample-cutter +@item polysynth +@item algorithmic drum machine +@item drone box +@item granulator +@item asynchronous looper +@item polyphasic sequencer +@end itemize") + (license (list license:gpl3 ;code + license:asl2.0)))) ;Roboto font + ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances ;;; of a merge conflict, place them above by existing packages with similar diff --git a/gnu/packages/patches/norns-remove-nonfree-fonts.patch b/gnu/packages/patches/norns-remove-nonfree-fonts.patch new file mode 100644 index 0000000000..716fd435be --- /dev/null +++ b/gnu/packages/patches/norns-remove-nonfree-fonts.patch @@ -0,0 +1,41 @@ +Author: Antero Mejr +Notes: It appears that the Bitstream Vera license restricts commercial +redistribution so patch those fonts out. + +diff --git a/matron/src/hardware/screen.c b/matron/src/hardware/screen.c +index d0cf86e0..1fe494ec 100644 +--- a/matron/src/hardware/screen.c ++++ b/matron/src/hardware/screen.c +@@ -31,7 +31,7 @@ + } + #endif + +-#define NUM_FONTS 67 ++#define NUM_FONTS 57 + #define NUM_OPS 29 + + static char font_path[NUM_FONTS][32]; +@@ -107,21 +107,11 @@ void screen_init(void) { + strcpy(font_path[11], "Roboto-MediumItalic.ttf"); + strcpy(font_path[12], "Roboto-BoldItalic.ttf"); + strcpy(font_path[13], "Roboto-BlackItalic.ttf"); +- strcpy(font_path[14], "VeraBd.ttf"); +- strcpy(font_path[15], "VeraBI.ttf"); +- strcpy(font_path[16], "VeraIt.ttf"); +- strcpy(font_path[17], "VeraMoBd.ttf"); +- strcpy(font_path[18], "VeraMoBI.ttf"); +- strcpy(font_path[19], "VeraMoIt.ttf"); +- strcpy(font_path[20], "VeraMono.ttf"); +- strcpy(font_path[21], "VeraSeBd.ttf"); +- strcpy(font_path[22], "VeraSe.ttf"); +- strcpy(font_path[23], "Vera.ttf"); + //------------------ + // bitmap fonts +- strcpy(font_path[24], "bmp/tom-thumb.bdf"); ++ strcpy(font_path[14], "bmp/tom-thumb.bdf"); + // FIXME: this is totally silly... +- int i = 25; ++ int i = 15; + strcpy(font_path[i++], "bmp/creep.bdf"); + strcpy(font_path[i++], "bmp/ctrld-fixed-10b.bdf"); + strcpy(font_path[i++], "bmp/ctrld-fixed-10r.bdf"); -- 2.38.1