1{
2 lib,
3 stdenv,
4 perl,
5 fetchurl,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "davtest";
10 version = "1.0";
11
12 src = fetchurl {
13 url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/davtest/davtest-${version}.tar.bz2";
14 sha256 = "0kigcgv1bbnan9yr5481s4b9islmvzl2arpg1ig1i39sxrna06y7";
15 };
16
17 postPatch = ''
18 substituteInPlace davtest.pl \
19 --replace "backdoors/" "$out/share/davtest/backdoors/" \
20 --replace "tests/" "$out/share/davtest/tests/"
21 '';
22
23 buildInputs = [
24 (perl.withPackages (p: with p; [ HTTPDAV ]))
25 ];
26
27 installPhase = ''
28 runHook preInstall
29
30 install -Dm755 davtest.pl $out/bin/davtest.pl
31 mkdir -p $out/share/davtest
32 cp -r backdoors/ tests/ $out/share/davtest/
33
34 runHook postInstall
35 '';
36
37 meta = with lib; {
38 description = "Tests WebDAV servers by uploading test files, and then optionally testing for command execution or other actions directly on the target";
39 homepage = "https://code.google.com/p/davtest/";
40 mainProgram = "davtest.pl";
41 license = licenses.gpl3Only;
42 maintainers = with maintainers; [ emilytrau ];
43 platforms = platforms.unix;
44 };
45}