2019-05-16 03:51:35 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub }:
|
2012-02-04 10:32:07 +00:00
|
|
|
|
2019-03-05 11:01:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-16 03:51:35 +00:00
|
|
|
pname = "analog";
|
2021-06-21 12:14:29 +00:00
|
|
|
version = "6.0.17";
|
2019-05-16 03:51:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "c-amie";
|
|
|
|
repo = "analog-ce";
|
|
|
|
rev = version;
|
2021-06-21 12:14:29 +00:00
|
|
|
sha256 = "sha256-89nNkIUKzlcKKy0TfthA9T27A446Fqv9hYllGjYkDP4=";
|
2012-02-04 10:32:07 +00:00
|
|
|
};
|
|
|
|
|
2021-03-10 11:52:55 +00:00
|
|
|
postPatch = ''
|
2012-02-04 10:32:07 +00:00
|
|
|
sed -i src/anlghead.h \
|
|
|
|
-e "s|#define DEFAULTCONFIGFILE .*|#define DEFAULTCONFIGFILE \"$out/etc/analog.cfg\"|g" \
|
2021-10-02 19:31:17 +00:00
|
|
|
-e "s|#define LANGDIR .*|#define LANGDIR \"$out/share/${pname}/lang/\"|g"
|
2021-03-10 11:52:55 +00:00
|
|
|
substituteInPlace src/Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
|
2012-02-04 10:32:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-05-16 03:51:35 +00:00
|
|
|
mkdir -p $out/bin $out/etc $out/share/doc/$pname $out/share/man/man1 $out/share/$pname
|
2012-02-04 10:32:07 +00:00
|
|
|
mv analog $out/bin/
|
|
|
|
cp examples/big.cfg $out/etc/analog.cfg
|
|
|
|
mv analog.man $out/share/man/man1/analog.1
|
2019-05-16 03:51:35 +00:00
|
|
|
mv docs $out/share/doc/$pname/manual
|
|
|
|
mv how-to $out/share/doc/$pname/
|
|
|
|
mv lang images examples $out/share/$pname/
|
2012-02-04 10:32:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2019-05-16 03:51:35 +00:00
|
|
|
homepage = "https://www.c-amie.co.uk/software/analog/";
|
|
|
|
license = lib.licenses.gpl2;
|
2013-10-05 14:22:46 +00:00
|
|
|
description = "Powerful tool to generate web server statistics";
|
2021-03-10 11:52:55 +00:00
|
|
|
platforms = lib.platforms.all;
|
2012-02-04 10:32:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|