summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/tinc_graphs/default.nix
blob: 953804dd065613964ae04a34a56b289b1b095e9d (plain)
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
{ fetchFromGitHub, lib, pkgs, python3Packages, stdenv }:

python3Packages.buildPythonPackage rec {
  name = "tinc_graphs-${version}";
  version = "0.4.0";

  propagatedBuildInputs = with pkgs;[
    python3Packages.pygeoip
    ## ${geolite-legacy}/share/GeoIP/GeoIPCity.dat
  ];
  src = fetchFromGitHub {
    owner = "makefu";
    repo = "tinc_graphs";
    rev = version;
    sha256 = "0dbnafzz65b1nbgvj7b6skyf4x3f9rrkizmdwpnfh4qgs9ch5xmz";
  };

  preFixup = with pkgs;''
    wrapProgram $out/bin/build-graphs --prefix PATH : "$out/bin"
    wrapProgram $out/bin/all-the-graphs --prefix PATH : "${imagemagick}/bin:${graphviz}/bin:$out/bin"
    wrapProgram $out/bin/tinc-stats2json --prefix PATH : "${tinc}/bin"
  '';

  meta = {
    homepage = http://krebsco.de/;
    description = "Create Graphs from Tinc Stats";
    license = lib.licenses.wtfpl;
  };
}