2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-02-22 23:13:26 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
# Python bits:
|
|
|
|
, buildPythonPackage
|
|
|
|
, pytest
|
|
|
|
, responses
|
|
|
|
, docopt
|
|
|
|
, flask
|
|
|
|
, markdown
|
|
|
|
, path-and-address
|
|
|
|
, pygments
|
|
|
|
, requests
|
|
|
|
, tabulate
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "grip";
|
2018-10-27 14:08:45 +01:00
|
|
|
version = "4.5.2";
|
2018-02-22 23:13:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joeyespo";
|
|
|
|
repo = "grip";
|
|
|
|
rev = "v${version}";
|
2018-10-27 14:08:45 +01:00
|
|
|
sha256 = "0hphplnyi903jx7ghfxplg1qlj2kpcav1frr2js7p45pbh5ib9rm";
|
2018-02-22 23:13:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Render "front matter", used in our RFC template and elsewhere
|
|
|
|
(fetchpatch {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://github.com/joeyespo/grip/pull/249.patch";
|
2018-02-22 23:13:26 +00:00
|
|
|
sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-02-23 07:38:04 +00:00
|
|
|
checkInputs = [ pytest responses ];
|
2018-02-22 23:13:26 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export PATH="$PATH:$out/bin"
|
|
|
|
py.test -xm "not assumption"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-22 23:13:26 +00:00
|
|
|
description = "Preview GitHub Markdown files like Readme locally before committing them";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/joeyespo/grip";
|
2018-02-22 23:13:26 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
}
|