Commit ff7d6c7e authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python3Packages.tilequant: fix build, cleanup

parent 93ed0a8a
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,
  setuptools-dso,

  # dependencies
  click,
  fetchPypi,
  ordered-set,
  pillow,
  pythonOlder,
  setuptools,
  setuptools-dso,
  sortedcollections,
}:

@@ -16,19 +19,23 @@ buildPythonPackage rec {
  version = "1.2.0";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-0i7brL/hn8SOj3q/rpOcOQ9QW/4Mew2fr0Y42k4K9UI=";
  src = fetchFromGitHub {
    owner = "SkyTemple";
    repo = "tilequant";
    tag = version;
    # Fetch tilequant source files
    fetchSubmodules = true;
    hash = "sha256-MgyKLwVdL2DRR8J88q7Q57rQiX4FTOlQ5rTY3UuhaJM=";
  };

  pythonRelaxDeps = [ "pillow" ];

  build-system = [
    setuptools
    setuptools-dso
  ];

  pythonRelaxDeps = [
    "click"
  ];
  dependencies = [
    click
    ordered-set
@@ -41,12 +48,12 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "tilequant" ];

  meta = with lib; {
  meta = {
    description = "Tool for quantizing image colors using tile-based palette restrictions";
    homepage = "https://github.com/SkyTemple/tilequant";
    changelog = "https://github.com/SkyTemple/tilequant/releases/tag/${version}";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ marius851000 ];
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ marius851000 ];
    mainProgram = "tilequant";
  };
}