12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
20 sha256 = "sha256-lWiDbWc2BWAUgyaIm0tvZytja02WogYRoc7na4sHiNM=";
23 # Nikto searches its configuration file based on its current path
24 # This fixes the current path regex for the wrapped executable.
25 patches = [ ./nix-wrapper-fix.patch ];
28 # EXECDIR needs to be changed to the path where we copy the programs stuff
29 # Forcing SSLeay is needed for SSL support (the auto mode doesn't seem to work otherwise)
30 substituteInPlace program/nikto.conf.default \
31 --replace "# EXECDIR=/opt/nikto" "EXECDIR=$out/share" \
32 --replace "LW_SSL_ENGINE=auto" "LW_SSL_ENGINE=SSLeay"
35 nativeBuildInputs = [ makeWrapper installShellFiles ];
39 perlPackages.NetSSLeay
44 install -d "$out/share"
45 cp -a program/* "$out/share"
46 install -Dm 755 "program/nikto.pl" "$out/bin/nikto"
47 install -Dm 644 program/nikto.conf.default "$out/etc/nikto.conf"
48 installManPage documentation/nikto.1
49 install -Dm 644 README.md "$out/share/doc/${pname}/README"
54 wrapProgram $out/bin/nikto \
55 --prefix PERL5LIB : $PERL5LIB
59 description = "Web server scanner";
60 mainProgram = "nikto";
61 license = licenses.gpl2Plus;
62 homepage = "https://cirt.net/Nikto2";
63 changelog = "https://github.com/sullo/nikto/releases/tag/${version}";
64 maintainers = with maintainers; [ shamilton ];
65 platforms = platforms.unix;