Commit 32257c8e authored by Bruno BELANYI's avatar Bruno BELANYI
Browse files

nemorosa: init at 0.3.0

parent fdb77670
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  python3Packages,
}:

python3Packages.buildPythonApplication rec {
  pname = "nemorosa";
  version = "0.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "KyokoMiki";
    repo = "nemorosa";
    tag = version;
    hash = "sha256-UBvtff5fU3kH/+Kw426+yyoyJ3aASBIYDPX+X5jqkA8=";
  };

  # Upstream uses overly strict, fresh version specifiers
  pythonRelaxDeps = true;

  # `build-system` requirements are seemingly not covered by pythonRelaxDeps
  postPatch = ''
    sed -i 's/requires = \["uv_build.*"\]/requires = ["uv_build"]/' pyproject.toml
  '';

  build-system = with python3Packages; [ uv-build ];

  dependencies =
    with python3Packages;
    [
      aiolimiter
      apscheduler
      beautifulsoup4
      defusedxml
      deluge-client
      fastapi
      httpx
      humanfriendly
      msgspec
      platformdirs
      qbittorrent-api
      reflink-copy
      sqlalchemy
      torf
      transmission-rpc
      uvicorn
      uvloop
    ]
    ++ beautifulsoup4.optional-dependencies.lxml
    ++ msgspec.optional-dependencies.yaml
    ++ sqlalchemy.optional-dependencies.aiosqlite
    ++ uvicorn.optional-dependencies.standard;

  pythonImportsCheck = [ "nemorosa" ];

  meta = {
    description = "Specialized cross-seeding tool designed for music torrents";
    homepage = "https://github.com/KyokoMiki/nemorosa";
    changelog = "https://github.com/KyokoMiki/nemorosa/releases";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ambroisie ];
    mainProgram = "nemorosa";
  };
}