From 3ddba7f670da6cd9a83ba673228edf98f58ed4cc Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Tue, 17 Nov 2026 09:07:05 +0100 Subject: [PATCH] pinwheel: Install `picard` plugin `replaygain2` from a pinned source --- hosts/pinwheel/modules/picard/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hosts/pinwheel/modules/picard/default.nix b/hosts/pinwheel/modules/picard/default.nix index eaec436..29663a2 100644 --- a/hosts/pinwheel/modules/picard/default.nix +++ b/hosts/pinwheel/modules/picard/default.nix @@ -8,6 +8,15 @@ let wrapProgram $out/bin/picard --set QT_SCREEN_SCALE_FACTORS 1.5 ''; }; + + plugins = pkgs.linkFarm "picard-plugins" { + replaygain2 = pkgs.fetchFromGitHub { + owner = "metabrainz"; + repo = "picard-plugin-replaygain2"; + tag = "v2.3.1"; + hash = "sha256-NBn/LgjDRVCHmbI+bU4j29UhrL33ctV9jXj6CfFRBWA="; + }; + }; in { home-manager.users.alex = { lib, ... }: { @@ -17,8 +26,8 @@ in ]; home.activation.picardReplayGainPlugin = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - if ! ${pkgs.picard}/bin/picard-cli plugins info replaygain2 > /dev/null 2>&1; then - run ${pkgs.picard}/bin/picard-cli plugins install replaygain2 \ + if ! ${pkgs.picard}/bin/picard-cli plugins info replaygain2 2>/dev/null | grep -qF "${plugins}/replaygain2"; then + run ${pkgs.picard}/bin/picard-cli --yes plugins install --no-git --reinstall "${plugins}/replaygain2" \ || warnEcho "Failed to install Picard plugin replaygain2" fi '';