Unverified Commit 7271a39b authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

beets{,Packages}: rewrite / reform (#452540)

parents 5bd9d731 a1e0137d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
{
  python3,
}:

python3.pkgs.toPythonApplication python3.pkgs.beets-minimal
+5 −0
Original line number Diff line number Diff line
{
  python3,
}:

python3.pkgs.toPythonApplication python3.pkgs.beets
+74 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  beets,
  python3Packages,
  fetchpatch,
  buildPythonPackage,

  # build-system
  poetry-core,

  # nativeBuildInputs
  beets-minimal,

  # tests
  pytestCheckHook,
  pytest-cov-stub,
  mock,
  pillow,
  tomli,
  typeguard,
  writableTmpDirAsHomeHook,
}:

python3Packages.buildPythonApplication rec {
buildPythonPackage rec {
  pname = "beets-alternatives";
  version = "0.13.4";
  pyproject = true;
@@ -18,25 +32,32 @@ python3Packages.buildPythonApplication rec {
    hash = "sha256-jGHRoBBXqJq0r/Gbp7gkuaEFPVMGE6cqQRi84AHTXxQ=";
  };

  nativeBuildInputs = [
    beets
  patches = [
    # Fixes build failure by ignoring DeprecationWarning during tests.
    (fetchpatch {
      url = "https://github.com/geigerzaehler/beets-alternatives/commit/3c15515edfe62d5d6c8f3fb729bf3dcef41c1ffa.patch";
      hash = "sha256-gZXftDI5PXJ0c65Z1HLABJ2SlDnXU78xxIEt7IGp8RQ=";
      excludes = [
        "poetry.lock"
      ];
    })
  ];

  build-system = [
    poetry-core
  ];

  dependencies = [
    python3Packages.poetry-core
  nativeBuildInputs = [
    beets-minimal
  ];

  nativeCheckInputs =
    with python3Packages;
    [
  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
    mock
    pillow
    tomli
    typeguard
    ]
    ++ [
    writableTmpDirAsHomeHook
  ];

+22 −9
Original line number Diff line number Diff line
{
  beets,
  fetchFromGitHub,
  lib,
  fetchFromGitHub,
  buildPythonPackage,

  # build-system
  hatchling,

  # native
  beets,

  # dependencies
  markdownify,
  natsort,
  tldextract,

  # passthru
  nix-update-script,
  python3Packages,
}:
python3Packages.buildPythonApplication rec {

buildPythonPackage rec {
  pname = "beets-audible";
  version = "1.0.2";
  pyproject = true;
@@ -17,17 +30,17 @@ python3Packages.buildPythonApplication rec {
    hash = "sha256-6rf8U63SW+gwfT7ZdN/ymYKHRs0HSMDTP2ZBfULLsJs=";
  };

  build-system = [
    hatchling
  ];

  nativeBuildInputs = [
    beets
  ];

  pythonRelaxDeps = true;

  build-system = with python3Packages; [
    hatchling
  ];

  dependencies = with python3Packages; [
  dependencies = [
    markdownify
    natsort
    tldextract
+21 −10
Original line number Diff line number Diff line
{
  lib,
  beets,
  fetchFromGitHub,
  python3Packages,
  buildPythonPackage,

  # build-system
  setuptools,

  # nativeBuildInputs
  beets-minimal,

  # dependencies
  six,

  # tests
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

python3Packages.buildPythonApplication rec {
buildPythonPackage rec {
  pname = "beets-copyartifacts";
  version = "0.1.5";
  pyproject = true;
@@ -27,20 +38,20 @@ python3Packages.buildPythonApplication rec {
    sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py
  '';

  nativeBuildInputs = [
    beets
  build-system = [
    setuptools
  ];

  build-system = with python3Packages; [
    setuptools
  nativeBuildInputs = [
    beets-minimal
  ];

  dependencies = with python3Packages; [
  dependencies = [
    six
  ];

  nativeCheckInputs = [
    python3Packages.pytestCheckHook
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

@@ -55,7 +66,7 @@ python3Packages.buildPythonApplication rec {
    homepage = "https://github.com/adammillerio/beets-copyartifacts";
    changelog = "https://github.com/adammillerio/beets-copyartifacts/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    inherit (beets.meta) platforms;
    inherit (beets-minimal.meta) platforms;
    # Isn't compatible with beets >= 2.3
    broken = true;
  };
Loading