diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-11 13:27:35 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-11 13:27:35 +0200 |
commit | 4f6baddf4fb3c3956847b99efcf2f2ae41fe3a01 (patch) | |
tree | def9be26f3edb4e8593d3f4d06427c1b4f0768d5 /pkgs | |
parent | refactor(home/beets): Move the plugins out into separate directories (diff) | |
download | nixos-config-4f6baddf4fb3c3956847b99efcf2f2ae41fe3a01.tar.gz nixos-config-4f6baddf4fb3c3956847b99efcf2f2ae41fe3a01.zip |
feat(home/beets): Init the xtractor plugin
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/be/beetsExtraPlugins/package.nix | 3 | ||||
-rw-r--r-- | pkgs/by-name/be/beetsExtraPlugins/xtractor.nix | 54 |
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/by-name/be/beetsExtraPlugins/package.nix b/pkgs/by-name/be/beetsExtraPlugins/package.nix new file mode 100644 index 00000000..0da472fa --- /dev/null +++ b/pkgs/by-name/be/beetsExtraPlugins/package.nix @@ -0,0 +1,3 @@ +{pkgs, ...}: { + xtractor = pkgs.callPackage ./xtractor.nix {beets = pkgs.beetsPackages.beets-minimal;}; +} diff --git a/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix b/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix new file mode 100644 index 00000000..01c6207a --- /dev/null +++ b/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix @@ -0,0 +1,54 @@ +{ + lib, + fetchFromGitHub, + python3Packages, + beets, +}: +# FIXME: Find a way to update this derivation <2024-08-11> +let + version = "0.4.2"; + models = builtins.fetchTarball { + url = "https://essentia.upf.edu/svm_models/essentia-extractor-svm_models-v2.1_beta5.tar.gz"; + sha256 = "11ps1l4h8bl4l9rlvkhjs61908l18dh7mpq65brm8ki99hnp9g64"; + }; +in + python3Packages.buildPythonApplication { + inherit version; + pname = "beets-xtractor"; + pyproject = true; + + src = fetchFromGitHub { + repo = "BeetsPluginXtractor"; + owner = "adamjakab"; + rev = "v${version}"; + hash = "sha256-it4qQ2OS4qBEaGLJK8FVGpjlvg0MQICazV7TAM8lH9s="; + }; + + nativeBuildInputs = [ + beets + python3Packages.setuptools + ]; + + passthru = {inherit models;}; + + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + pytest-cov + mock + typeguard + ]; + + preCheck = '' + export HOME="$(mktemp -d)" + ''; + postInstall = '' + mkdir --parents $out/models + cp ${models}/* $out/models + ''; + + meta = { + description = "Obtain low and high level musical information from your song"; + homepage = "https://github.com/adamjakab/BeetsPluginXtractor/releasesfhhhhh"; + license = lib.licenses.mit; + }; + } |