about summary refs log tree commit diff
path: root/pkgs/tools/networking/httpstat/default.nix
blob: 49f71f44805111822502361aec5ad689c328e310 (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
{ stdenv, fetchFromGitHub, curl, python, pythonPackages, ... }:

pythonPackages.buildPythonPackage rec {
    name = "${pname}-${version}";
    pname = "httpstat";
    version = "1.2.0";
    src = fetchFromGitHub {
      owner = "reorx";
      repo = pname;
      rev = "${version}";
      sha256 = "1zfbv3fz3g3wwvsgrcyrk2cp7pjhkpf7lmx57ry9b43c62gcd7yh";
    };
    doCheck = false;
    propagatedBuildInputs = [ ];
    runtimeDeps = [ curl ];

    installPhase = ''
      mkdir -p $out/${python.sitePackages}/
      cp httpstat.py $out/${python.sitePackages}/
      mkdir -p $out/bin
      ln -s $out/${python.sitePackages}/httpstat.py $out/bin/httpstat
      chmod +x $out/bin/httpstat
    '';

    meta = {
      description = "curl statistics made simple";
      homepage = https://github.com/reorx/httpstat;
      license = stdenv.lib.licenses.mit;
      maintainers = with stdenv.lib.maintainers; [ nequissimus ];
    };
  }