Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / grip / default.nix
blobf76fd2548b037b76d4f78affd0571fc8664cacdc
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 # Python bits:
5 , buildPythonPackage
6 , pytest
7 , responses
8 , docopt
9 , flask
10 , markdown
11 , path-and-address
12 , pygments
13 , requests
14 , tabulate
17 buildPythonPackage rec {
18   pname = "grip";
19   version = "4.6.1";
20   format = "setuptools";
22   src = fetchFromGitHub {
23     owner = "joeyespo";
24     repo = "grip";
25     rev = "v${version}";
26     hash = "sha256-CHL2dy0H/i0pLo653F7aUHFvZHTeZA6jC/rwn1KrEW4=";
27   };
29   patches = [
30     # https://github.com/NixOS/nixpkgs/issues/288478
31     (fetchpatch {
32       name = "set-default-encoding.patch";
33       url = "https://github.com/joeyespo/grip/commit/2784eb2c1515f1cdb1554d049d48b3bff0f42085.patch";
34       hash = "sha256-veVJKJtt8mP1jmseRD7pNR3JgIxX1alYHyQok/rBpiQ=";
35     })
36   ];
38   nativeCheckInputs = [ pytest responses ];
40   propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ];
42   checkPhase = ''
43       export PATH="$PATH:$out/bin"
44       py.test -xm "not assumption"
45   '';
47   meta = with lib; {
48     description = "Preview GitHub Markdown files like Readme locally before committing them";
49     mainProgram = "grip";
50     homepage = "https://github.com/joeyespo/grip";
51     license = licenses.mit;
52     maintainers = with maintainers; [ koral ];
53   };