2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, asciidoc, libxml2,
|
2018-08-02 13:35:29 +00:00
|
|
|
libxslt, docbook_xsl }:
|
2018-08-02 08:36:57 +00:00
|
|
|
|
2020-06-07 21:11:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tinyproxy";
|
2018-09-12 20:42:44 +00:00
|
|
|
version = "1.10.0";
|
2018-08-02 08:36:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-09-12 20:42:44 +00:00
|
|
|
sha256 = "0gzapnllzyc005l3rs6iarjk1p5fc8mf9ysbck1mbzbd8xg6w35s";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2018-08-02 08:36:57 +00:00
|
|
|
repo = "tinyproxy";
|
|
|
|
owner = "tinyproxy";
|
|
|
|
};
|
|
|
|
|
2018-08-02 13:35:29 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook asciidoc libxml2 libxslt docbook_xsl ];
|
2018-08-02 08:36:57 +00:00
|
|
|
|
|
|
|
# -z flag is not supported in darwin
|
2021-01-15 09:19:50 +00:00
|
|
|
preAutoreconf = lib.optionalString stdenv.isDarwin ''
|
2018-08-02 08:36:57 +00:00
|
|
|
substituteInPlace configure.ac --replace \
|
|
|
|
'LDFLAGS="-Wl,-z,defs $LDFLAGS"' \
|
|
|
|
'LDFLAGS="-Wl, $LDFLAGS"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
# See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=154624
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace docs/man5/Makefile --replace \
|
|
|
|
"-f manpage" \
|
2018-08-02 13:35:29 +00:00
|
|
|
"--xsltproc-opts=--nonet \\
|
|
|
|
-f manpage \\
|
2018-08-02 08:36:57 +00:00
|
|
|
-L"
|
|
|
|
substituteInPlace docs/man8/Makefile --replace \
|
|
|
|
"-f manpage" \
|
2018-08-02 13:35:29 +00:00
|
|
|
"--xsltproc-opts=--nonet \\
|
|
|
|
-f manpage \\
|
2018-08-02 08:36:57 +00:00
|
|
|
-L"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-debug" # Turn off debugging
|
|
|
|
"--enable-xtinyproxy" # Compile in support for the XTinyproxy header, which is sent to any web server in your domain.
|
|
|
|
"--enable-filter" # Allows Tinyproxy to filter out certain domains and URLs.
|
|
|
|
"--enable-upstream" # Enable support for proxying connections through another proxy server.
|
|
|
|
"--enable-transparent" # Allow Tinyproxy to be used as a transparent proxy daemon.
|
|
|
|
"--enable-reverse" # Enable reverse proxying.
|
|
|
|
] ++
|
|
|
|
# See: https://github.com/tinyproxy/tinyproxy/issues/1
|
2021-01-15 09:19:50 +00:00
|
|
|
lib.optional stdenv.isDarwin "--disable-regexcheck";
|
2018-08-02 08:36:57 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://tinyproxy.github.io/";
|
2018-08-02 08:36:57 +00:00
|
|
|
description = "A light-weight HTTP/HTTPS proxy daemon for POSIX operating systems";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.carlosdagos ];
|
|
|
|
};
|
|
|
|
}
|