about summary refs log tree commit diff
path: root/pkgs/by-name/cu/cups-printers/package.nix
blob: 9b5e336316e0899aca20879a3cb17dbf1b313edb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ 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";
  };
}