nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3,
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "clairvoyance";
9 version = "2.5.5";
10 pyproject = true;
11
12 src = fetchFromGitHub {
13 owner = "nikitastupin";
14 repo = "clairvoyance";
15 tag = "v${version}";
16 hash = "sha256-anUceLMTeHQ/Z0+MjKL0alDdKaWA5y3HpJC81MBTTq8=";
17 };
18
19 pythonRelaxDeps = [ "rich" ];
20
21 build-system = with python3.pkgs; [ poetry-core ];
22
23 dependencies = with python3.pkgs; [
24 aiohttp
25 rich
26 ];
27
28 nativeCheckInputs = with python3.pkgs; [
29 aiounittest
30 pytestCheckHook
31 ];
32
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace 'asyncio = "^3.4.3"' ""
36 '';
37
38 pythonImportsCheck = [ "clairvoyance" ];
39
40 disabledTests = [
41 # KeyError
42 "test_probe_typename"
43 ];
44
45 meta = {
46 description = "Tool to obtain GraphQL API schemas";
47 homepage = "https://github.com/nikitastupin/clairvoyance";
48 changelog = "https://github.com/nikitastupin/clairvoyance/releases/tag/${src.tag}";
49 license = lib.licenses.asl20;
50 maintainers = with lib.maintainers; [ fab ];
51 mainProgram = "clairvoyance";
52 };
53}