mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
74 lines
1.6 KiB
Nix
74 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
fetchurl,
|
|
perlPackages,
|
|
jdk,
|
|
}:
|
|
|
|
perlPackages.buildPerlPackage rec {
|
|
pname = "awstats";
|
|
version = "7.9";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/awstats/${pname}-${version}.tar.gz";
|
|
sha256 = "sha256-YVF47TE9NDFfFaUi2xpdEsqcOV43hbsGKAq/+V2aBUY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace wwwroot/cgi-bin/awstats.pl \
|
|
--replace /usr/share/awstats/ "$out/wwwroot/cgi-bin/"
|
|
'';
|
|
|
|
outputs = [
|
|
"bin"
|
|
"out"
|
|
"doc"
|
|
]; # bin just links the user-run executable
|
|
|
|
propagatedBuildOutputs = [ ]; # otherwise out propagates bin -> cycle
|
|
|
|
buildInputs = with perlPackages; [ ]; # plugins will need some
|
|
|
|
preConfigure = ''
|
|
touch Makefile.PL
|
|
patchShebangs .
|
|
'';
|
|
|
|
# build our own JAR
|
|
preBuild = ''
|
|
(
|
|
cd wwwroot/classes/src
|
|
rm ../*.jar
|
|
PATH="${jdk}/bin" "$(type -P perl)" Makefile.pl
|
|
test -f ../*.jar
|
|
)
|
|
'';
|
|
|
|
doCheck = false;
|
|
|
|
installPhase = ''
|
|
mkdir "$out"
|
|
mv wwwroot "$out/wwwroot"
|
|
rm -r "$out/wwwroot/classes/src/"
|
|
|
|
mkdir -p "$out/share/awstats"
|
|
mv tools "$out/share/awstats/tools"
|
|
|
|
mkdir -p "$bin/bin"
|
|
ln -s "$out/wwwroot/cgi-bin/awstats.pl" "$bin/bin/awstats"
|
|
|
|
mkdir -p "$doc/share/doc"
|
|
mv README.md docs/
|
|
mv docs "$doc/share/doc/awstats"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
changelog = "https://www.awstats.org/docs/awstats_changelog.txt";
|
|
description = "Real-time logfile analyzer to get advanced statistics";
|
|
homepage = "https://awstats.org";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.unix;
|
|
mainProgram = "awstats";
|
|
};
|
|
}
|