summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2013-07-29 07:38:59 +0200
committeraszlig <aszlig@redmoonstudios.org>2013-07-30 05:59:59 +0200
commitb42eb45429a26cb900d8db2474a88058bf266e00 (patch)
tree32a6c607972a836e32bb028167ad32c5e7370ed3 /pkgs/servers
parentcd4b5e1a35863f7c79c47c8dc874b23b423f71f8 (diff)
downloadnixlib-b42eb45429a26cb900d8db2474a88058bf266e00.tar
nixlib-b42eb45429a26cb900d8db2474a88058bf266e00.tar.gz
nixlib-b42eb45429a26cb900d8db2474a88058bf266e00.tar.bz2
nixlib-b42eb45429a26cb900d8db2474a88058bf266e00.tar.lz
nixlib-b42eb45429a26cb900d8db2474a88058bf266e00.tar.xz
nixlib-b42eb45429a26cb900d8db2474a88058bf266e00.tar.zst
nixlib-b42eb45429a26cb900d8db2474a88058bf266e00.zip
thttpd: New package, version 2.25b.
We already have mini_httpd, but IMHO it is *too* minimal as in not very
flexible in configuration (for example, I haven't found any runtime
configuration for disabling logging), so that's why I decided to add
thttpd, which serves quite well as an ad-hoc HTTPd.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/http/thttpd/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/servers/http/thttpd/default.nix b/pkgs/servers/http/thttpd/default.nix
new file mode 100644
index 000000000000..e03183cbe49d
--- /dev/null
+++ b/pkgs/servers/http/thttpd/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "thttpd-${version}";
+  version = "2.25b";
+
+  src = fetchurl {
+    url = "http://acme.com/software/thttpd/${name}.tar.gz";
+    sha256 = "0q13sfkh6amn5wk0ccbmxq3mnhlm8g5pnyk910fa5xngn449nw87";
+  };
+
+  prePatch = ''
+    sed -i -e 's/getline/getlineX/' extras/htpasswd.c
+  '';
+
+  preInstall = ''
+    ensureDir "$out/man/man1"
+    sed -i -e 's/-o bin -g bin *//' Makefile
+    sed -i -e '/chgrp/d' extras/Makefile
+  '';
+
+  meta = {
+    description = "Tiny/turbo/throttling HTTP server";
+    homepage = "http://www.acme.com/software/thttpd/";
+    license = stdenv.lib.licenses.bsd2;
+  };
+}