mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
7a0fffdfe9
Fix the following warning when using services.tinyproxy: trace: warning: getExe: Package "tinyproxy-1.11.1" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, autoreconfHook
|
|
, perl
|
|
, nixosTests
|
|
, withDebug ? false
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tinyproxy";
|
|
version = "1.11.1";
|
|
|
|
src = fetchFromGitHub {
|
|
sha256 = "sha256-tipFXh9VG5auWTI2/IC5rwMQFls7aZr6dkzhYTZZkXM=";
|
|
rev = version;
|
|
repo = "tinyproxy";
|
|
owner = "tinyproxy";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "CVE-2022-40468.patch";
|
|
url = "https://github.com/tinyproxy/tinyproxy/commit/3764b8551463b900b5b4e3ec0cd9bb9182191cb7.patch";
|
|
sha256 = "sha256-P0c4mUK227ld3703ss5MQhi8Vo2QVTCVXhKmc9fcufk=";
|
|
})
|
|
];
|
|
|
|
# perl is needed for man page generation.
|
|
nativeBuildInputs = [ autoreconfHook perl ];
|
|
|
|
configureFlags = lib.optionals withDebug [ "--enable-debug" ]; # Enable debugging support code and methods.
|
|
passthru.tests = { inherit (nixosTests) tinyproxy; };
|
|
|
|
meta = with lib; {
|
|
homepage = "https://tinyproxy.github.io/";
|
|
description = "A light-weight HTTP/HTTPS proxy daemon for POSIX operating systems";
|
|
license = licenses.gpl2Only;
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.carlosdagos ];
|
|
mainProgram = "tinyproxy";
|
|
};
|
|
}
|