A personal Guix channel
This channel contains mostly non-free software I personally use, which I could not find packaged anywhere else.
Programs provided by this channel:
Renoise
Installation
Add this channel to =~/.config/guix/channels.scm= like this:
(cons* (channel (name 'yumi) (url "https://github.com/senkowo/guix-channel") ;; Enable signature verification: (introduction (make-channel-introduction "d1256cf136ced2ed4a3736417fbced678bacb1f6" (openpgp-fingerprint "864D 7D40 2260 D1A5 E9B9 AC9B B703 FEDE 1CF1 30EA")))) %default-channels)
Renoise is a non-free, modern, tracker-based DAW with demo and paid versions.
Homepage: https://www.renoise.com
Package definition: [[file:yumi/packages/renoise.scm][./yumi/packages/renoise.scm]]
The =renoise= package, by default, pulls a copy of the demo-version installer from the Renoise website.
** Installing the demo version
To install the demo version, you simply install the package as =renoise=.
** Install from a file
To install Renoise from an installer saved on your system (necessary for the paid/full version), you must apply a transformation to the package. This can be done in several ways:
*** Using command-line arguments
Command to install:
~$ guix install --with-source=renoise@
So for example:
~$ guix install --with-source=renoise@3.4.3=/home/yui/Downloads/rns_343_linux_x86_64.tar.gz renoise@3.4.3~
This will install Renoise verison 3.4.3 in the default profile using an installer found at the path specified. The installer must be a =tar.gz= file.
Some explanations:
*** Using Scheme
The following code applies the same transformation to the =renoise= package and provides it with variable =renoise-custom=.
(use-modules (gnu packages) (guix transformations))
(define transform-install-path (options->transformation '((with-source . "renoise@3.4.3=/home/yui/Downloads/rns_343_linux_x86_64.tar.gz"))))
(define-public renoise-custom (transform-install-path (specification->package "renoise@3.4.3")))
If you want to install this to the default profile, you could simply append ~renoise-custom~ to the end of the file, then run ~$ guix install -f
Personally, I like to add it to a pre-existing manifest in another file, like this:
(define-public renoise-manifest (cons* ;; renoise pacakge renoise-custom ;; misc (specifications->packages '("jack" "jack2" "qjackctl" "alsa-utils" "programming-socks"))))
**** Using a package variant
Instead of returning simply the original package but with a transformation applied to it, you can instead create an entirely new package variant. I've had mixed results with doing this, and I would personally stick to the previous methods described, but this is always an option.
An example:
(define transform-install-path (options->transformation '((with-source . "renoise@3.4.3=/home/yui/Downloads/rns_343_linux_x86_64.tar.gz"))))
(define-public renoise-full-3.4.3 (package (inherit (transform-install-path (specification->package "renoise@3.4.3"))) ; make sure to specify version (name "renoise-full")))
This will provide a package called =renoise-full= that has the transformations applied to it already. It's important to specify =renoise@
** Prevent guix gc from deleting sources in store
If you installed Renoise from a local file, after running ~guix gc~, it may delete its setup files from the Guix store, requiring having to refetch the installer when rebuilding the package. When this happens, the package transformation will need to point to a valid path to the installer.
I personally prefer to delete the Renoise installer after installing it onto my system, just to wipe out any possibility of accidentally uploading my paid copy of Renoise somewhere. But if Guix deletes the Renoise setup files from the store, it will expect the installer to be where I specified it in the transformation. So to deal with this, you can make Guix never delete the Renoise sources.
To prevent Guix from deleting the Renoise sources from the store, run the following:
~$ guix build --with-source=renoise@
This will create a symlink at =
*** If you created a package variant
If you created a Renoise package variant that applies the transformation, the command to run is a little bit different:
~$ guix build --with-source=renoise-full@
The package name specified after =--with-source== and at the very end must match your package variant's name.
** Setting up Renoise
Do the following to make sure everything is set up:
*** Check CPU frequency governor
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
If this returns something other than =performance=, it means CPU frequency scaling is enabled, and should be disabled for Renoise to work properly. More info here: https://wiki.linuxaudio.org/wiki/system_configuration#cpu_frequency_scaling
**** On Guix System: I was able to fix this using the following code in my system configuration:
(service tlp-service-type (tlp-configuration ;; for renoise/music DAW (cpu-scaling-governor-on-ac (list "performance")) (cpu-scaling-governor-on-bat (list "performance")) (energy-perf-policy-on-ac "performance") (energy-perf-policy-on-bat "performance")))
If you dont use =tlp= or dont have a battery power supply on your computer, you shouldn't blindly copy this code into your configuration.
*** Check PAM audio configuration
*** On foreign distros: Check if either =/etc/security/limits.d/audio.conf= exists or if running =grep -E "^[^#]+(rtprio).$" /etc/security/limits.conf= returns some value. If so, PAM should be installed and configured for realtime audio applications.
**** On Guix System: In your =operating-system= declaration, make sure you have something like:
(groups (cons (user-group (system? #t) (name "realtime")) %base-groups))
As well as:
(users (cons* (user-account (name "nya") (comment "Nya") (group "users") (home-directory "/home/nya") (supplementary-groups '("wheel" "audio" "video" "netdev" "kvm" "docker" "realtime"))) ; add the newly created group to user %base-user-accounts))
(note the ~"realtime"~ near the bottom (we created this group with the first code block))
And also:
(service pam-limits-service-type (list (pam-limits-entry "@realtime" 'both 'rtprio 99) ;; 'nice value adjusts priority of audio/video processes... ;; (pam-limits-entry "@realtime" 'both 'nice 0) (pam-limits-entry "@realtime" 'both 'memlock 'unlimited)))
(this configures PAM for realtime audio applications for users under the =realtime= group (I think))
*** Further configuration
You'll want to set up Jack or pure Alsa to get Renoise to work. If you're using Pulseaudio, you will either need to do some heavy hacking, or install Pipewire. If you're using Guix System, the best approach is to set up Guix Home and install the Pipewire home service (you would then launch Renoise with =$ pw-jack renoise= to provide a Jack interface).
** Need help getting Renoise to work on Guix System?
Post an issue and I'll try to help out. There's a good chance I've faced a similar issue.
I'm not extremely savvy with Guix or scheme, so let me know if there are any ways in which I can improve this channel! :3
For example:
request to make available certain Renoise versions
channel not working!
improving package definitions, but especially Renoise's
References
https://www.renoise.com: Renoise homepage.
https://gitlab.com/guix-gaming-channels/games: on avoiding guix gc from deleting sources, and all around a great resource on non-free guix packages.
https://bcacciaaudio.com/2018/01/30/audio-music-production-in-linux-part-1-setting-up-jack-audio/: general info regarding audio on Linux and how to set up Jack.
https://jackaudio.org/faq/pulseaudio_and_jack.html: the available options in trying to get Jack and pulseaudio to work together.
https://codeberg.org/daviwil/dotfiles/src/branch/master/.config/pulse: Daviwil's pulseaudio config
https://guix.gnu.org/en/blog/2020/music-production-on-guix-system/: Article on music production on Guix.
Notes to self
Does not specifying package version to transformation actually break things when the renoise package definition is updated?
enable git commit signing: git config --global user.signingKey <gpg --list-keys --keyid-format long> git config --global commit.gpgSign true