about summary refs log tree commit diff
path: root/pkgs/by-name/ey/eyewitness/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ey/eyewitness/package.nix')
-rw-r--r--pkgs/by-name/ey/eyewitness/package.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/by-name/ey/eyewitness/package.nix b/pkgs/by-name/ey/eyewitness/package.nix
new file mode 100644
index 0000000000000..7cda284f6be80
--- /dev/null
+++ b/pkgs/by-name/ey/eyewitness/package.nix
@@ -0,0 +1,70 @@
+{ lib
+, fetchFromGitHub
+, python3Packages
+, cmake
+, xvfb-run
+, firefox-esr
+, geckodriver
+, makeWrapper
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "eye-witness";
+  version = "20230525.1";
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "redsiege";
+    repo = "EyeWitness";
+    rev = "v${version}";
+    hash = "sha256-nSPpPbwqagc5EadQ4AHgLhjQ0kDjmbdcwE/PL5FDL4I=";
+  };
+
+  build-system = with python3Packages; [
+    setuptools
+  ] ++ [
+    makeWrapper
+  ];
+
+  dependencies = with python3Packages; [
+    selenium
+    fuzzywuzzy
+    pyvirtualdisplay
+    pylev
+    netaddr
+    pydevtool
+  ] ++ [
+    firefox-esr
+    xvfb-run
+    geckodriver
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{bin,share/eyewitness}
+    cp -R * $out/share/eyewitness
+
+    runHook postInstall
+  '';
+
+  fixupPhase = ''
+    runHook preFixup
+
+    makeWrapper "${python3Packages.python.interpreter}" "$out/bin/eyewitness" \
+      --set PYTHONPATH "$PYTHONPATH" \
+      --add-flags "$out/share/eyewitness/Python/EyeWitness.py"
+
+    runHook postFixup
+  '';
+
+  meta = with lib; {
+    description = "Take screenshots of websites, and identify admin interfaces";
+    homepage = "https://github.com/redsiege/EyeWitness";
+    changelog = "https://github.com/redsiege/EyeWitness/blob/${src.rev}/CHANGELOG";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ tochiaha ];
+    mainProgram = "eye-witness";
+    platforms = platforms.all;
+  };
+}