nixpkgs/pkgs/by-name/jo/joomscan/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

39 lines
1000 B
Nix

{ lib, stdenv, fetchFromGitHub, perl, makeWrapper }:
let
p = perl.withPackages (ps: with ps; [ LWP LWPProtocolHttps ]);
in
stdenv.mkDerivation rec {
pname = "joomscan";
version = "unstable-2021-06-08";
src = fetchFromGitHub {
owner = "owasp";
repo = pname;
rev = "79315393509caa39895e553c489667636ac31b85";
sha256 = "Yg91iUhqbKZyPghiX0UZ7S1ql0DZLtPHOk9VEY1ZZOg=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r . $out/share/joomscan
makeWrapper ${p}/bin/perl $out/bin/joomscan.pl \
--add-flags $out/share/joomscan/joomscan.pl
runHook postInstall
'';
meta = with lib; {
description = "Joomla Vulnerability Scanner";
homepage = "https://wiki.owasp.org/index.php/Category:OWASP_Joomla_Vulnerability_Scanner_Project";
mainProgram = "joomscan.pl";
maintainers = with maintainers; [ emilytrau ];
license = licenses.gpl3Only;
platforms = platforms.all;
};
}