Files
nixpkgs/pkgs/development/python-modules/grip/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

67 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
fetchpatch,
# Python bits:
buildPythonPackage,
pytest,
responses,
docopt,
flask,
markdown,
path-and-address,
pygments,
requests,
tabulate,
}:
buildPythonPackage rec {
pname = "grip";
version = "4.6.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "joeyespo";
repo = "grip";
rev = "v${version}";
hash = "sha256-CHL2dy0H/i0pLo653F7aUHFvZHTeZA6jC/rwn1KrEW4=";
};
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=";
})
];
nativeCheckInputs = [
pytest
responses
];
propagatedBuildInputs = [
docopt
flask
markdown
path-and-address
pygments
requests
tabulate
];
checkPhase = ''
export PATH="$PATH:$out/bin"
py.test -xm "not assumption"
'';
meta = {
description = "Preview GitHub Markdown files like Readme locally before committing them";
mainProgram = "grip";
homepage = "https://github.com/joeyespo/grip";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ koral ];
};
}