From 141ec34c9a8c3b6ec04324d18b624abec981c5f4 Mon Sep 17 00:00:00 2001 From: Julius de Bruijn Date: Tue, 2 Aug 2022 20:36:46 +0200 Subject: [PATCH 1/2] beets: fix pygobject issues --- pkgs/tools/audio/beets/common.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index 9a81c7518e5e..f419ba00626e 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -63,6 +63,11 @@ python3Packages.buildPythonApplication rec { unidecode ] ++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins)); + # see: https://github.com/NixOS/nixpkgs/issues/56943#issuecomment-1131643663 + nativeBuildInputs = [ + gobject-introspection + ]; + buildInputs = [ ] ++ (with gst_all_1; [ gst-plugins-base From bd0a5ce380fee429032a70b75160b1261d38c868 Mon Sep 17 00:00:00 2001 From: Julius de Bruijn Date: Wed, 3 Aug 2022 23:51:43 +0200 Subject: [PATCH 2/2] beets: test to validate gstreamer interop --- pkgs/tools/audio/beets/common.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index f419ba00626e..968544f2790e 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -23,6 +23,10 @@ , version , pluginOverrides ? { } , disableAllPlugins ? false + + # tests +, runCommand +, beets }@inputs: let inherit (lib) attrNames attrValues concatMap; @@ -142,8 +146,26 @@ python3Packages.buildPythonApplication rec { runHook postCheck ''; + passthru.plugins = allPlugins; + passthru.tests.gstreamer = runCommand "beets-gstreamer-test" { + meta.timeout = 60; + } + '' + set -euo pipefail + export HOME=$(mktemp -d) + mkdir $out + + cat << EOF > $out/config.yaml +replaygain: + backend: gstreamer +EOF + + echo $out/config.yaml + ${beets}/bin/beet -c $out/config.yaml > /dev/null + ''; + meta = with lib; { description = "Music tagger and library organizer"; homepage = "https://beets.io";