1 { lib, stdenv, fetchurl, perl, openldap, pam, db, cyrus_sasl, libcap
2 , expat, libxml2, openssl, pkg-config, systemd
6 stdenv.mkDerivation (finalAttrs: {
11 url = "http://www.squid-cache.org/Versions/v6/squid-${finalAttrs.version}.tar.xz";
12 hash = "sha256-EcxWULUYCdmUg8z64kdEouUc0WGZ9f8MkX6E/OaVhw8=";
15 nativeBuildInputs = [ pkg-config ];
17 perl openldap db cyrus_sasl expat libxml2 openssl
18 ] ++ lib.optionals stdenv.isLinux [ libcap pam systemd ];
20 enableParallelBuilding = true;
24 "--disable-strict-error-checking"
25 "--disable-arch-native"
28 "--enable-storeio=ufs,aufs,diskd,rock"
29 "--enable-removal-policies=lru,heap"
30 "--enable-delay-pools"
31 "--enable-x-accelerator-vary"
33 ] ++ lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl)
34 "--enable-linux-netfilter";
37 nativeCheckInputs = [ cppunit ];
39 # tests attempt to copy around "/bin/true" to make some things
40 # no-ops but this doesn't work if our "true" is a multi-call
41 # binary, so make our own fake "true" which will work when used
43 echo "#!$SHELL" > fake-true
45 grep -rlF '/bin/true' test-suite/ | while read -r filename ; do
46 substituteInPlace "$filename" \
47 --replace "$(type -P true)" "$(realpath fake-true)" \
48 --replace "/bin/true" "$(realpath fake-true)"
53 description = "Caching proxy for the Web supporting HTTP, HTTPS, FTP, and more";
54 homepage = "http://www.squid-cache.org";
55 license = licenses.gpl2Plus;
56 platforms = platforms.linux;
57 maintainers = with maintainers; [ raskin ];
58 knownVulnerabilities = [ "Squid has multiple unresolved security vulnerabilities, for more information see https://megamansec.github.io/Squid-Security-Audit/" ];