about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/tinyproxy/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/tools/networking/tinyproxy/default.nix
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/tinyproxy/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/networking/tinyproxy/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/tinyproxy/default.nix b/nixpkgs/pkgs/tools/networking/tinyproxy/default.nix
new file mode 100644
index 000000000000..809286cefe96
--- /dev/null
+++ b/nixpkgs/pkgs/tools/networking/tinyproxy/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchFromGitHub, automake, autoreconfHook, asciidoc, libxml2,
+  libxslt, docbook_xsl }:
+
+stdenv.mkDerivation rec{
+  name = "tinyproxy-${version}";
+  version = "1.10.0";
+
+  src = fetchFromGitHub {
+    sha256 = "0gzapnllzyc005l3rs6iarjk1p5fc8mf9ysbck1mbzbd8xg6w35s";
+    rev = "${version}";
+    repo = "tinyproxy";
+    owner = "tinyproxy";
+  };
+
+  nativeBuildInputs = [ autoreconfHook asciidoc libxml2 libxslt docbook_xsl ];
+
+  # -z flag is not supported in darwin
+  preAutoreconf = stdenv.lib.optionalString stdenv.isDarwin ''
+    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" \
+          "--xsltproc-opts=--nonet \\
+           -f manpage \\
+           -L"
+    substituteInPlace docs/man8/Makefile --replace \
+          "-f manpage" \
+          "--xsltproc-opts=--nonet \\
+           -f manpage \\
+           -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
+  stdenv.lib.optional stdenv.isDarwin "--disable-regexcheck";
+
+  meta = with stdenv.lib; {
+    homepage = https://tinyproxy.github.io/;
+    description = "A light-weight HTTP/HTTPS proxy daemon for POSIX operating systems";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.carlosdagos ];
+  };
+}