Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

77 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
python3Packages,
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;
};
}