Unverified Commit ccecb949 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #297532 from fabaff/cups-printers

cups-printers: init at 1.0.0
parents 3043777a 3243b276
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "cups-printers";
  version = "1.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "audiusGmbH";
    repo = "cups-printers";
    rev = "refs/tags/${version}";
    hash = "sha256-HTR9t9ElQmCzJfdWyu+JQ8xBfDNpXl8XtNsJxGSfBXk=";
  };

  pythonRelaxDeps = [
    "validators"
  ];

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = with python3.pkgs; [
    pycups
    typer
    validators
  ] ++ typer.optional-dependencies.all;

  # Project has no tests
  doCheck = false;

  pythonImportsCheck = [
    "cups_printers"
  ];

  meta = with lib; {
    description = "Tool for interacting with a CUPS server";
    homepage = "https://github.com/audiusGmbH/cups-printers";
    changelog = "https://github.com/audiusGmbH/cups-printers/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
    mainProgram = "cups-printers";
  };
}