analog: fix darwin build

This commit is contained in:
Ben Siraphob 2021-03-10 18:52:55 +07:00
parent 1a3b74cf75
commit da14f782bf

View File

@ -11,10 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "15hi8kfknldwpvm885r9s7zd5h7cirs7x0zazx2nnz62xvz3iymk"; sha256 = "15hi8kfknldwpvm885r9s7zd5h7cirs7x0zazx2nnz62xvz3iymk";
}; };
configurePhase = '' postPatch = ''
sed -i src/anlghead.h \ sed -i src/anlghead.h \
-e "s|#define DEFAULTCONFIGFILE .*|#define DEFAULTCONFIGFILE \"$out/etc/analog.cfg\"|g" \ -e "s|#define DEFAULTCONFIGFILE .*|#define DEFAULTCONFIGFILE \"$out/etc/analog.cfg\"|g" \
-e "s|#define LANGDIR .*|#define LANGDIR \"$out/share/$pname}/lang/\"|g" -e "s|#define LANGDIR .*|#define LANGDIR \"$out/share/$pname}/lang/\"|g"
substituteInPlace src/Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
''; '';
installPhase = '' installPhase = ''
@ -32,7 +33,7 @@ stdenv.mkDerivation rec {
license = lib.licenses.gpl2; license = lib.licenses.gpl2;
description = "Powerful tool to generate web server statistics"; description = "Powerful tool to generate web server statistics";
maintainers = [ lib.maintainers.peti ]; maintainers = [ lib.maintainers.peti ];
platforms = lib.platforms.linux; platforms = lib.platforms.all;
}; };
} }