1{ lib
2, python3
3, fetchFromGitHub
4}:
5
6python3.pkgs.buildPythonApplication rec {
7 pname = "cloudhunter";
8 version = "0.7.0";
9 format = "other";
10
11 src = fetchFromGitHub {
12 owner = "belane";
13 repo = "CloudHunter";
14 rev = "refs/tags/v${version}";
15 hash = "sha256-yRl3x1dboOcoPeKxpUEhDk8OJx1hynEJRHL9/Su8OyA=";
16 };
17
18 postPatch = ''
19 substituteInPlace cloudhunter.py \
20 --replace "'permutations.txt'" "'$out/share/permutations.txt'" \
21 --replace "'resolvers.txt'" "'$out/share/resolvers.txt'"
22 '';
23
24 propagatedBuildInputs = with python3.pkgs; [
25 beautifulsoup4
26 dnspython
27 requests
28 tldextract
29 urllib3
30 xmltodict
31 ];
32
33 installPhase = ''
34 runHook preInstall
35 install -vD cloudhunter.py $out/bin/cloudhunter
36 install -vD permutations-big.txt permutations.txt resolvers.txt -t $out/share
37 install -vd $out/${python3.sitePackages}/
38 runHook postInstall
39 '';
40
41 # Project has no tests
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Cloud bucket scanner";
46 homepage = "https://github.com/belane/CloudHunter";
47 changelog = "https://github.com/belane/CloudHunter/releases/tag/v${version}";
48 license = licenses.gpl3Only;
49 maintainers = with maintainers; [ fab ];
50 };
51}