diff options
Diffstat (limited to '')
-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; + }; + } |