diff --git a/pkgs/by-name/sq/squid/package.nix b/pkgs/by-name/sq/squid/package.nix index 5d2803944dcf..2ceb16f34194 100644 --- a/pkgs/by-name/sq/squid/package.nix +++ b/pkgs/by-name/sq/squid/package.nix @@ -14,20 +14,19 @@ pkg-config, systemd, cppunit, - esi ? false, ipv6 ? true, nixosTests, }: stdenv.mkDerivation (finalAttrs: { pname = "squid"; - version = "6.13"; + version = "7.0.1"; src = fetchurl { url = "https://github.com/squid-cache/squid/releases/download/SQUID_${ builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version }/squid-${finalAttrs.version}.tar.xz"; - hash = "sha256-Iy4FZ5RszAEVZTw8GPAeg/LZzEnEPZ3q2LMZrws1rVI="; + hash = "sha256-Bw3Y5iGtItRdcAYF6xnSysG2zae3PwTzRXjTw/2N35s="; }; nativeBuildInputs = [ pkg-config ]; @@ -62,7 +61,6 @@ stdenv.mkDerivation (finalAttrs: { "--enable-htcp" ] ++ (if ipv6 then [ "--enable-ipv6" ] else [ "--disable-ipv6" ]) - ++ lib.optional (!esi) "--disable-esi" ++ lib.optional ( stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl ) "--enable-linux-netfilter"; @@ -81,6 +79,20 @@ stdenv.mkDerivation (finalAttrs: { --replace "$(type -P true)" "$(realpath fake-true)" \ --replace "/bin/true" "$(realpath fake-true)" done + + cd test-suite/ + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/libexec $out/etc $out/share + cd .. + cp src/squid $out/bin + cp src/unlinkd $out/libexec + cp src/mime.conf.default $out/etc/mime.conf + cp -r icons $out/share + cp -r errors $out/share + runHook postInstall ''; passthru.tests.squid = nixosTests.squid;