2021-01-15 22:18:51 +00:00
|
|
|
{ fetchurl, lib, stdenv, autoreconfHook, curl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
major = "2";
|
|
|
|
minor = "22";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "dirb";
|
|
|
|
version = "${major}.${minor}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/dirb/${version}/dirb${major}${minor}.tar.gz";
|
|
|
|
sha256 = "0b7wc2gvgnyp54rxf1n9arn6ymrvdb633v6b3ah138hw4gg8lx7k";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ curl ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
tar -xf $src
|
|
|
|
find . -exec chmod +x "{}" ";"
|
|
|
|
export sourceRoot="dirb222"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s#/usr#$out#" src/dirb.c
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: resume.o:/build/dirb222/src/variables.h:15: multiple definition of `curl';
|
|
|
|
# crea_wordlist.o:/build/dirb222/src/variables.h:15: first defined here
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
mkdir -p $out/share/{dirb,wordlists}
|
2020-04-24 23:36:52 +00:00
|
|
|
cp -r wordlists/ $out/share/dirb/
|
2024-01-02 11:29:13 +00:00
|
|
|
ln -s $out/share/dirb/wordlists/ $out/share/wordlists/dirb
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Web content scanner";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://dirb.sourceforge.net/";
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ bennofs ];
|
2024-05-15 15:35:15 +00:00
|
|
|
license = with lib.licenses; [ gpl2Only ];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|