Unverified Commit 93e58459 authored by Ivan Mincik's avatar Ivan Mincik Committed by GitHub
Browse files

funkwhale: init dependencies (#453976)

parents 2d4685c3 fcd67e5c
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  django,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-django,
  nix-update-script,
}:

buildPythonPackage rec {
  pname = "django-cache-memoize";
  version = "0.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "peterbe";
    repo = "django-cache-memoize";
    # No tags. See <https://github.com/peterbe/django-cache-memoize/issues/60>.
    rev = "9a0dc28315b9bd2848973d38b6f63a400a0e0526";
    hash = "sha256-oORTN53s9GVHiY9tbx5FKb7ygkYUKWgPRJusdB0RfcA=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    django
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
    pytest-django
  ];

  pythonImportsCheck = [ "cache_memoize" ];

  passthru.updateScript = nix-update-script {
    extraArgs = [ "--version=branch" ];
  };

  meta = {
    description = "Django utility for a memoization decorator that uses the Django cache framework";
    homepage = "https://github.com/peterbe/django-cache-memoize";
    changelog = "https://github.com/peterbe/django-cache-memoize/blob/${src.rev}/CHANGELOG.rst";
    license = lib.licenses.mpl20;
    teams = [ lib.teams.ngi ];
  };
}
+41 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  setuptools-scm,
  regex,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "lb-matching-tools";
  version = "2024.01.30.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "metabrainz";
    repo = "listenbrainz-matching-tools";
    tag = "v${version}";
    hash = "sha256-RQ4X6DKigQsNxaAWXB1meATKP+ddMUgkoAIyX8iIisU=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [ regex ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "lb_matching_tools" ];

  meta = {
    description = "ListenBrainz tools for matching metadata to and from MusicBrainz";
    homepage = "https://github.com/metabrainz/listenbrainz-matching-tools";
    changelog = "https://github.com/metabrainz/listenbrainz-matching-tools/releases/tag/${src.tag}";
    license = lib.licenses.gpl2Plus;
    teams = [ lib.teams.ngi ];
  };
}
+45 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  setuptools-scm,
  requests,
  pytestCheckHook,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "liblistenbrainz";
  version = "0.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "metabrainz";
    repo = "liblistenbrainz";
    tag = "v${version}";
    hash = "sha256-mUw+x9SEHrPocZRdtazqInMGLBDv1KUR5/mmfF3CbVg=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [ requests ];

  nativeCheckInputs = [
    pytestCheckHook
    requests-mock
  ];

  pythonImportsCheck = [ "liblistenbrainz" ];

  meta = {
    description = "Simple ListenBrainz client library for Python";
    homepage = "https://github.com/metabrainz/liblistenbrainz";
    changelog = "https://github.com/metabrainz/liblistenbrainz/releases/tag/${src.tag}";
    license = lib.licenses.gpl3Plus;
    teams = [ lib.teams.ngi ];
  };
}
+34 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pluralizer";
  version = "2.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "weixu365";
    repo = "pluralizer-py";
    tag = "v${version}";
    hash = "sha256-2m7E4cwAdmny/5R5FqaCzk8mu9so/ZCgNPBckTdIc/0=";
  };

  build-system = [ hatchling ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pluralizer" ];

  meta = {
    description = "Singularize or pluralize a given word using a pre-defined list of rules";
    homepage = "https://github.com/weixu365/pluralizer-py";
    changelog = "https://github.com/weixu365/pluralizer-py/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    teams = [ lib.teams.ngi ];
  };
}
+30 −8
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  ffmpeg-headless,
  setuptools,
  pyee,
  fetchPypi,
  setuptools-scm,
  pytestCheckHook,
  pytest-asyncio,
}:

buildPythonPackage rec {
  pname = "python_ffmpeg";
  pname = "python-ffmpeg";
  version = "2.0.12";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "GayAr1oGSi9TwkWvGpCbLXZI6gRVANltO81Qe4jUPcc=";
  src = fetchFromGitHub {
    owner = "jonghwanhyeon";
    repo = "python-ffmpeg";
    tag = "v${version}";
    hash = "sha256-1dhkjrg7QUtYSyEV9c88HphdcFuSCSaGJqVAQmMF/5E=";
  };

  propagatedBuildInputs = [ pyee ];
  postPatch = ''
    substituteInPlace ffmpeg/{ffmpeg.py,asyncio/ffmpeg.py,protocol.py} \
      --replace-fail 'executable: str = "ffmpeg"' 'executable: str = "${lib.getExe ffmpeg-headless}"'
    substituteInPlace tests/helpers.py \
      --replace-fail '"ffprobe"' '"${lib.getExe' ffmpeg-headless "ffprobe"}"'

    # Some systems can finish before the `0.1` timeout.
    substituteInPlace tests/test_{,asyncio_}timeout.py \
      --replace-fail 'ffmpeg.execute(timeout=0.1)' 'ffmpeg.execute(timeout=0.01)'
  '';

  build-system = [ setuptools ];

  dependencies = [ pyee ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  nativeBuildInputs = [ setuptools-scm ];
  pythonImportsCheck = [ "ffmpeg" ];

  meta = {
Loading