8 python3.pkgs.buildPythonApplication rec {
9 pname = "ripe-atlas-tools";
12 src = fetchFromGitHub {
14 repo = "ripe-atlas-tools";
15 rev = "refs/tags/v${version}";
16 hash = "sha256-aETSDXCVteTruRKV/8Aw3R/bprB6txOsXrFvoZOxIus=";
20 # This mapping triggers network access on docs generation: https://github.com/RIPE-NCC/ripe-atlas-tools/issues/235
21 sed -i '/^intersphinx_mapping/d' docs/conf.py
22 # TODO: Ensure user-agent is picked up during build, remove me when https://github.com/RIPE-NCC/ripe-atlas-tools/pull/236
23 echo "include ripe/atlas/tools/user-agent" >> MANIFEST.in
26 nativeBuildInputs = with python3.pkgs; [
32 propagatedBuildInputs = with python3.pkgs; [
46 echo "RIPE Atlas Tools [NixOS ${version}" > ripe/atlas/tools/user-agent
50 installShellCompletion --cmd ripe-atlas --bash ./ripe-atlas-bash-completion.sh
53 pythonImportsCheck = [
57 nativeCheckInputs = with python3.pkgs; [
62 # Network tests: https://github.com/RIPE-NCC/ripe-atlas-tools/issues/234
65 # We injected our user-agent so the tests will fail
67 "test_user_agent_windows"
68 "test_user_agent_xdg_absent"
69 "test_user_agent_xdg_present"
73 # Relies on `ripe-atlas` being available in the PATH, installed with autocompletions
74 "tests/test_bash_completion.py"
75 # AS lookups are not mocked up: https://github.com/RIPE-NCC/ripe-atlas-tools/blob/master/tests/renderers/test_traceroute_aspath.py#L26
76 "tests/renderers/test_traceroute_aspath.py"
77 # We already build Sphinx so we do not need to test it
81 HOME = "$TMPDIR"; # for cache generation.
83 # Necessary because it confuse the tests when it does "from ripe.atlas.sagan import X"
84 # version.py is used by Sphinx tests.
87 mkdir -p ripe/atlas/tools
88 echo "__version__ = \"${version}\"" > ripe/atlas/tools/version.py
92 description = "RIPE ATLAS project tools";
93 homepage = "https://github.com/RIPE-NCC/ripe-atlas-tools";
94 changelog = "https://github.com/RIPE-NCC/ripe-atlas-tools/blob/v${version}/CHANGES.rst";
95 license = licenses.gpl3Only;
96 maintainers = with maintainers; [ raitobezarius ];