1{ lib
2, buildPythonPackage
3, click
4, fetchFromGitHub
5, parameterized
6, pytestCheckHook
7, pythonOlder
8, setuptools-scm
9}:
10
11buildPythonPackage rec {
12 pname = "moreorless";
13 version = "0.4.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "thatch";
20 repo = "moreorless";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-N11iqsxMGgzwW2QYeOoHQaR/aDEuoUnnd/2Mc5culN0=";
23 };
24
25 SETUPTOOLS_SCM_PRETEND_VERSION = version;
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 click
33 ];
34
35 nativeCheckInputs = [
36 parameterized
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "moreorless"
42 ];
43
44 pytestFlagsArray = [
45 "moreorless/tests/click.py"
46 "moreorless/tests/general.py"
47 "moreorless/tests/patch.py"
48 ];
49
50 meta = with lib; {
51 description = "Wrapper to make difflib.unified_diff more fun to use";
52 homepage = "https://github.com/thatch/moreorless/";
53 license = licenses.mit;
54 maintainers = with maintainers; [ fab ];
55 };
56}