2021-03-03 13:09:27 +00:00
|
|
|
{ lib, stdenv
|
2021-03-03 16:18:09 +00:00
|
|
|
, nixosTests
|
2023-11-05 22:50:49 +00:00
|
|
|
, fetchpatch
|
2021-03-03 13:09:27 +00:00
|
|
|
, fetchurl, autoreconfHook
|
|
|
|
, zlib, pcre, w3m, man
|
2021-09-28 19:25:36 +00:00
|
|
|
, openssl, brotli
|
2021-03-03 13:09:27 +00:00
|
|
|
}:
|
2009-10-05 14:15:28 +00:00
|
|
|
|
2020-06-07 21:11:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-30 14:21:20 +00:00
|
|
|
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "privoxy";
|
2023-03-08 19:30:46 +00:00
|
|
|
version = "3.0.34";
|
2009-10-05 14:15:28 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/ijbswa/Sources/${version}%20%28stable%29/${pname}-${version}-stable-src.tar.gz";
|
2023-03-08 19:30:46 +00:00
|
|
|
sha256 = "sha256-5sy8oWVvTmFrRlf4UU4zpw9ml+nXKUNWV3g5Mio8XSw=";
|
2009-10-05 14:15:28 +00:00
|
|
|
};
|
|
|
|
|
2023-11-05 22:50:49 +00:00
|
|
|
# Patch to fix socks4 and socks4a support under glibc's source fortification
|
|
|
|
# (enabled by default since glibc 2.38-0)
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=19d7684ca10f6c1279568aa19e9a9da2276851f1";
|
|
|
|
sha256 = "sha256-bCb0RUVrWeGfqZYFHXDEEx+76xiNyVqehtLvk9C1j+4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-12-06 13:29:29 +00:00
|
|
|
hardeningEnable = [ "pie" ];
|
|
|
|
|
2016-12-05 12:13:12 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook w3m man ];
|
2021-09-28 19:25:36 +00:00
|
|
|
buildInputs = [ zlib pcre openssl brotli ];
|
2016-12-05 12:13:12 +00:00
|
|
|
|
2021-03-03 13:09:27 +00:00
|
|
|
makeFlags = [ "STRIP=" ];
|
|
|
|
configureFlags = [
|
2021-09-28 19:25:36 +00:00
|
|
|
"--with-openssl"
|
2021-03-03 13:09:27 +00:00
|
|
|
"--with-brotli"
|
|
|
|
"--enable-external-filters"
|
|
|
|
"--enable-compression"
|
|
|
|
];
|
2017-08-03 21:17:30 +00:00
|
|
|
|
2016-12-05 12:13:12 +00:00
|
|
|
postInstall = ''
|
2021-03-03 13:09:27 +00:00
|
|
|
rm -r $out/var
|
2016-12-05 12:13:12 +00:00
|
|
|
'';
|
2009-10-05 14:15:28 +00:00
|
|
|
|
2021-03-03 16:18:09 +00:00
|
|
|
passthru.tests.privoxy = nixosTests.privoxy;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.privoxy.org/";
|
2013-12-04 02:41:25 +00:00
|
|
|
description = "Non-caching web proxy with advanced filtering capabilities";
|
2021-03-03 13:09:27 +00:00
|
|
|
# When linked with mbedtls, the license becomes GPLv3 (or later), otherwise
|
|
|
|
# GPLv2 (or later). See https://www.privoxy.org/user-manual/copyright.html
|
2021-09-28 19:25:36 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2013-12-04 02:41:25 +00:00
|
|
|
platforms = platforms.all;
|
2021-12-18 09:25:46 +00:00
|
|
|
maintainers = [ ];
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "privoxy";
|
2013-12-04 02:41:25 +00:00
|
|
|
};
|
2016-01-30 14:21:20 +00:00
|
|
|
|
2009-10-05 14:15:28 +00:00
|
|
|
}
|