1 { stdenv, lib, fetchFromGitHub }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-NCturEibnpl6+paUZezksHzP33WtAzfIolvBLeEHXjY=";
15 sed -i src/anlghead.h \
16 -e "s|#define DEFAULTCONFIGFILE .*|#define DEFAULTCONFIGFILE \"$out/etc/analog.cfg\"|g" \
17 -e "s|#define LANGDIR .*|#define LANGDIR \"$out/share/${pname}/lang/\"|g"
18 substituteInPlace src/Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
22 mkdir -p $out/bin $out/etc $out/share/doc/$pname $out/share/man/man1 $out/share/$pname
24 cp examples/big.cfg $out/etc/analog.cfg
25 mv analog.man $out/share/man/man1/analog.1
26 mv docs $out/share/doc/$pname/manual
27 mv how-to $out/share/doc/$pname/
28 mv lang images examples $out/share/$pname/
32 homepage = "https://www.c-amie.co.uk/software/analog/";
33 license = lib.licenses.gpl2Only;
34 description = "Powerful tool to generate web server statistics";
35 platforms = lib.platforms.all;
36 mainProgram = "analog";