Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beets: fix pygobject issues #184871

Merged
merged 2 commits into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions pkgs/tools/audio/beets/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
, version
, pluginOverrides ? { }
, disableAllPlugins ? false

# tests
, runCommand
, beets
}@inputs:
let
inherit (lib) attrNames attrValues concatMap;
Expand Down Expand Up @@ -63,6 +67,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
Expand Down Expand Up @@ -137,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";
Expand Down