1{ stdenv, lib, fetchFromGitHub, makeWrapper }:
2
3stdenv.mkDerivation rec {
4 pname = "exploitdb";
5 version = "2021-11-18";
6
7 src = fetchFromGitHub {
8 owner = "offensive-security";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-GSqJIM/wAgSKn9BWOSEwmrVTwI6ZOTZGNHRcepDT7MI=";
12 };
13
14 nativeBuildInputs = [ makeWrapper ];
15
16 installPhase = ''
17 runHook preInstall
18 mkdir -p $out/bin $out/share
19 cp --recursive . $out/share/exploitdb
20 makeWrapper $out/share/exploitdb/searchsploit $out/bin/searchsploit
21 runHook postInstall
22 '';
23
24 meta = with lib; {
25 homepage = "https://github.com/offensive-security/exploitdb";
26 description = "Archive of public exploits and corresponding vulnerable software";
27 license = with licenses; [ gpl2Plus gpl3Plus mit ];
28 maintainers = with maintainers; [ applePrincess ];
29 mainProgram = "searchsploit";
30 };
31}