Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at github-to-sqlite-beautifulsoup4 46 lines 1.2 kB view raw
1{ fetchurl, lib, stdenv, autoreconfHook, curl }: 2 3let 4 major = "2"; 5 minor = "22"; 6in stdenv.mkDerivation rec { 7 pname = "dirb"; 8 version = "${major}.${minor}"; 9 10 src = fetchurl { 11 url = "mirror://sourceforge/dirb/${version}/dirb${major}${minor}.tar.gz"; 12 sha256 = "0b7wc2gvgnyp54rxf1n9arn6ymrvdb633v6b3ah138hw4gg8lx7k"; 13 }; 14 15 nativeBuildInputs = [ autoreconfHook ]; 16 buildInputs = [ curl ]; 17 18 unpackPhase = '' 19 tar -xf $src 20 find . -exec chmod +x "{}" ";" 21 export sourceRoot="dirb222" 22 ''; 23 24 postPatch = '' 25 sed -i "s#/usr#$out#" src/dirb.c 26 ''; 27 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"; 33 34 postInstall = '' 35 mkdir -p $out/share/dirb/ 36 cp -r wordlists/ $out/share/dirb/ 37 ''; 38 39 meta = { 40 description = "A web content scanner"; 41 homepage = "https://dirb.sourceforge.net/"; 42 maintainers = with lib.maintainers; [ bennofs ]; 43 license = with lib.licenses; [ gpl2 ]; 44 platforms = lib.platforms.unix; 45 }; 46}