Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / naked / default.nix
blob7a37d66861aa512f13a5ffe641162c481f1aea06
1 { buildPythonPackage
2 , fetchFromGitHub
3 , lib
4 , requests
5 , pyyaml
6 , setuptools
7 , wheel
8 , nodejs
9 , ruby
10 , pytestCheckHook
13 buildPythonPackage rec {
14   pname = "naked";
15   version = "0.1.32";
16   pyproject = true;
18   src = fetchFromGitHub {
19     owner = "chrissimpkins";
20     repo = "naked";
21     rev = "v${version}";
22     hash = "sha256-KhygnURFggvUTR9wwWtORtfQES8ANd5sIaCONvIhfRM=";
23   };
25   postPatch = ''
26     # fix hardcoded absolute paths
27     substituteInPlace **/*.* \
28       --replace /Users/ces/Desktop/code/naked /build/source
29   '';
31   nativeBuildInputs = [ wheel setuptools ];
33   propagatedBuildInputs = [
34     requests
35     pyyaml
36   ];
38   nativeCheckInputs = [ pytestCheckHook nodejs ruby ];
40   preCheck =''
41     cd tests
43     PATH=$PATH:$out/bin
44   '';
46   disabledTestPaths = [ "testfiles" ];
48   disabledTests = [
49     # test_NETWORK.py
50     "test_http_get"
51     "test_http_get_binary_file_absent"
52     "test_http_get_binary_file_exists"
53     "test_http_get_bin_type"
54     "test_http_get_follow_redirects"
55     "test_http_get_follow_redirects_false_content"
56     "test_http_get_follow_redirects_false_on_nofollow_arg"
57     "test_http_get_response_check_200"
58     "test_http_get_response_check_301"
59     "test_http_get_response_check_404"
60     "test_http_get_response_obj_present"
61     "test_http_get_ssl"
62     "test_http_get_status_check_true"
63     "test_http_get_status_ssl"
64     "test_http_get_status_ssl_redirect"
65     "test_http_get_text_absent"
66     "test_http_get_text_exists_request_overwrite"
67     "test_http_get_type"
68     "test_http_post"
69     "test_http_post_binary_file_absent"
70     "test_http_post_binary_file_present"
71     "test_http_post_binary_file_present_request_overwrite"
72     "test_http_post_reponse_status_200"
73     "test_http_post_response_status_200_ssl"
74     "test_http_post_ssl"
75     "test_http_post_status_check_true"
76     "test_http_post_text_file_absent"
77     "test_http_post_text_file_present_request_overwrite"
78     "test_http_post_type"
79     # test_SHELL.py
80     "test_muterun_missing_option_exitcode"
81     # test_SYSTEM.py
82     "test_sys_list_all_files"
83     "test_sys_list_all_files_cwd"
84     "test_sys_list_all_files_emptydir"
85     "test_sys_list_filter_files"
86     "test_sys_match_files"
87     "test_sys_match_files_fullpath"
88     "test_sys_meta_file_mod"
89     # test_TYPES.py
90     "test_xdict_key_random"
91     "test_xdict_key_random_sample"
92   ];
94   pythonImportsCheck = [ "Naked" ];
96   meta = with lib; {
97     description = "A Python command line application framework";
98     homepage = "https://github.com/chrissimpkins/naked";
99     downloadPage = "https://github.com/chrissimpkins/naked/tags";
100     license = licenses.mit;
101     maintainers = [ maintainers.lucasew ];
102   };