2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
# Python bits:
|
|
|
|
buildPythonPackage,
|
|
|
|
pytest,
|
|
|
|
responses,
|
|
|
|
docopt,
|
|
|
|
flask,
|
|
|
|
markdown,
|
|
|
|
path-and-address,
|
|
|
|
pygments,
|
|
|
|
requests,
|
|
|
|
tabulate,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "grip";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "4.6.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joeyespo";
|
|
|
|
repo = "grip";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-CHL2dy0H/i0pLo653F7aUHFvZHTeZA6jC/rwn1KrEW4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/288478
|
|
|
|
(fetchpatch {
|
|
|
|
name = "set-default-encoding.patch";
|
|
|
|
url = "https://github.com/joeyespo/grip/commit/2784eb2c1515f1cdb1554d049d48b3bff0f42085.patch";
|
|
|
|
hash = "sha256-veVJKJtt8mP1jmseRD7pNR3JgIxX1alYHyQok/rBpiQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest
|
|
|
|
responses
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
docopt
|
|
|
|
flask
|
|
|
|
markdown
|
|
|
|
path-and-address
|
|
|
|
pygments
|
|
|
|
requests
|
|
|
|
tabulate
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2024-06-05 15:53:02 +00:00
|
|
|
export PATH="$PATH:$out/bin"
|
|
|
|
py.test -xm "not assumption"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Preview GitHub Markdown files like Readme locally before committing them";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "grip";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/joeyespo/grip";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
}
|