nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3,
4 fetchPypi,
5 khard,
6 testers,
7}:
8
9python3.pkgs.buildPythonApplication rec {
10 pname = "khard";
11 version = "0.20.1";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-s+W/rfa11+jxaNDDIMdLlU5NDvQZSyh5EUD+V3pI+Ug=";
17 };
18
19 build-system = with python3.pkgs; [
20 setuptools
21 setuptools-scm
22 sphinxHook
23 sphinx-argparse
24 sphinx-autoapi
25 sphinx-autodoc-typehints
26 ];
27
28 sphinxBuilders = [ "man" ];
29
30 dependencies = with python3.pkgs; [
31 configobj
32 ruamel-yaml
33 unidecode
34 vobject
35 ];
36
37 postInstall = ''
38 install -D misc/zsh/_khard $out/share/zsh/site-functions/_khard
39 '';
40
41 preCheck = ''
42 # see https://github.com/scheibler/khard/issues/263
43 export COLUMNS=80
44 '';
45
46 pythonImportsCheck = [ "khard" ];
47
48 passthru.tests.version = testers.testVersion { package = khard; };
49
50 meta = {
51 homepage = "https://github.com/scheibler/khard";
52 description = "Console carddav client";
53 license = lib.licenses.gpl3;
54 maintainers = with lib.maintainers; [ matthiasbeyer ];
55 mainProgram = "khard";
56 };
57}