about summary refs log tree commit diff
path: root/pkgs/development/python-modules/naked/default.nix
blob: 7a37d66861aa512f13a5ffe641162c481f1aea06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{ buildPythonPackage
, fetchFromGitHub
, lib
, requests
, pyyaml
, setuptools
, wheel
, nodejs
, ruby
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "naked";
  version = "0.1.32";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "chrissimpkins";
    repo = "naked";
    rev = "v${version}";
    hash = "sha256-KhygnURFggvUTR9wwWtORtfQES8ANd5sIaCONvIhfRM=";
  };

  postPatch = ''
    # fix hardcoded absolute paths
    substituteInPlace **/*.* \
      --replace /Users/ces/Desktop/code/naked /build/source
  '';

  nativeBuildInputs = [ wheel setuptools ];

  propagatedBuildInputs = [
    requests
    pyyaml
  ];

  nativeCheckInputs = [ pytestCheckHook nodejs ruby ];

  preCheck =''
    cd tests

    PATH=$PATH:$out/bin
  '';

  disabledTestPaths = [ "testfiles" ];

  disabledTests = [
    # test_NETWORK.py
    "test_http_get"
    "test_http_get_binary_file_absent"
    "test_http_get_binary_file_exists"
    "test_http_get_bin_type"
    "test_http_get_follow_redirects"
    "test_http_get_follow_redirects_false_content"
    "test_http_get_follow_redirects_false_on_nofollow_arg"
    "test_http_get_response_check_200"
    "test_http_get_response_check_301"
    "test_http_get_response_check_404"
    "test_http_get_response_obj_present"
    "test_http_get_ssl"
    "test_http_get_status_check_true"
    "test_http_get_status_ssl"
    "test_http_get_status_ssl_redirect"
    "test_http_get_text_absent"
    "test_http_get_text_exists_request_overwrite"
    "test_http_get_type"
    "test_http_post"
    "test_http_post_binary_file_absent"
    "test_http_post_binary_file_present"
    "test_http_post_binary_file_present_request_overwrite"
    "test_http_post_reponse_status_200"
    "test_http_post_response_status_200_ssl"
    "test_http_post_ssl"
    "test_http_post_status_check_true"
    "test_http_post_text_file_absent"
    "test_http_post_text_file_present_request_overwrite"
    "test_http_post_type"
    # test_SHELL.py
    "test_muterun_missing_option_exitcode"
    # test_SYSTEM.py
    "test_sys_list_all_files"
    "test_sys_list_all_files_cwd"
    "test_sys_list_all_files_emptydir"
    "test_sys_list_filter_files"
    "test_sys_match_files"
    "test_sys_match_files_fullpath"
    "test_sys_meta_file_mod"
    # test_TYPES.py
    "test_xdict_key_random"
    "test_xdict_key_random_sample"
  ];

  pythonImportsCheck = [ "Naked" ];

  meta = with lib; {
    description = "A Python command line application framework";
    homepage = "https://github.com/chrissimpkins/naked";
    downloadPage = "https://github.com/chrissimpkins/naked/tags";
    license = licenses.mit;
    maintainers = [ maintainers.lucasew ];
  };
}