summary refs log tree commit diff
path: root/pkgs/development/python-modules/grip/default.nix
blob: 019cd798d640f626dc0cb6d955b9f9d4df2d69f5 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
# Python bits:
, buildPythonPackage
, pytest
, responses
, docopt
, flask
, markdown
, path-and-address
, pygments
, requests
, tabulate
}:

buildPythonPackage rec {
  pname = "grip";
  version = "4.5.2";

  src = fetchFromGitHub {
    owner = "joeyespo";
    repo = "grip";
    rev = "v${version}";
    sha256 = "0hphplnyi903jx7ghfxplg1qlj2kpcav1frr2js7p45pbh5ib9rm";
  };

  patches = [
    # Render "front matter", used in our RFC template and elsewhere
    (fetchpatch {
      url = "https://github.com/joeyespo/grip/pull/249.patch";
      sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg";
    })
  ];

  checkInputs = [ pytest responses ];

  propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ];

  checkPhase = ''
      export PATH="$PATH:$out/bin"
      py.test -xm "not assumption"
  '';

  meta = with lib; {
    description = "Preview GitHub Markdown files like Readme locally before committing them";
    homepage = "https://github.com/joeyespo/grip";
    license = licenses.mit;
    maintainers = with maintainers; [ koral ];
  };
}