depot/third_party/nixpkgs/pkgs/development/python-modules/grip/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

51 lines
1.1 KiB
Nix

{ 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 stdenv.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 ];
};
}