1 { fetchurl, lib, stdenv, autoreconfHook, curl }:
6 in stdenv.mkDerivation rec {
8 version = "${major}.${minor}";
11 url = "mirror://sourceforge/dirb/${version}/dirb${major}${minor}.tar.gz";
12 sha256 = "0b7wc2gvgnyp54rxf1n9arn6ymrvdb633v6b3ah138hw4gg8lx7k";
15 nativeBuildInputs = [ autoreconfHook ];
16 buildInputs = [ curl ];
20 find . -exec chmod +x "{}" ";"
21 export sourceRoot="dirb222"
25 sed -i "s#/usr#$out#" src/dirb.c
28 # Workaround build failure on -fno-common toolchains like upstream
29 # gcc-10. Otherwise build fails as:
30 # ld: resume.o:/build/dirb222/src/variables.h:15: multiple definition of `curl';
31 # crea_wordlist.o:/build/dirb222/src/variables.h:15: first defined here
32 env.NIX_CFLAGS_COMPILE = "-fcommon";
35 mkdir -p $out/share/{dirb,wordlists}
36 cp -r wordlists/ $out/share/dirb/
37 ln -s $out/share/dirb/wordlists/ $out/share/wordlists/dirb
41 description = "Web content scanner";
42 homepage = "https://dirb.sourceforge.net/";
43 maintainers = with lib.maintainers; [ bennofs ];
44 license = with lib.licenses; [ gpl2Only ];
45 platforms = lib.platforms.unix;