Unverified Commit eb913725 authored by Tomodachi94's avatar Tomodachi94 Committed by GitHub
Browse files

audiomatch: init at 0.2.2 (#442049)

parents 3b30cce9 87363e62
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -14431,6 +14431,12 @@
    githubId = 4701504;
    name = "James Robinson";
  };
  leha44581 = {
    email = "leha55481@gmail.com";
    github = "Leha44581";
    githubId = 70238465;
    name = "Leha";
  };
  leifhelm = {
    email = "jakob.leifhelm@gmail.com";
    github = "leifhelm";
+45 −0
Original line number Diff line number Diff line
{
  lib,
  chromaprint,
  fetchFromGitHub,
  python3Packages,
}:
python3Packages.buildPythonPackage rec {
  version = "0.2.2";
  pname = "audiomatch";
  pyproject = true;
  src = fetchFromGitHub {
    owner = "unmade";
    repo = "audiomatch";
    tag = version;
    hash = "sha256-I7gTP2lwg4EDNmI+tVmI721/nEDShb7q21tD9tRbskY=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
     --replace-fail 'poetry>=0.12,<1.0' "poetry-core" \
     --replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api'

    substituteInPlace src/audiomatch/fingerprints.py \
     --replace-fail 'fpcalc' '${lib.getExe chromaprint}'
  '';

  build-system = [
    python3Packages.poetry-core
    python3Packages.distutils
  ];

  nativeCheckInputs = [
    python3Packages.pytestCheckHook
  ];

  meta = {
    homepage = "https://github.com/unmade/audiomatch";
    description = "A small command-line tool to find similar audio files";
    changelog = "https://github.com/unmade/audiomatch/releases/tag/${version}";
    license = lib.licenses.mit;
    platforms = lib.platforms.all;
    mainProgram = "audiomatch";
    maintainers = with lib.maintainers; [ leha44581 ];
  };
}