summary refs log tree commit diff
path: root/pkgs/servers/http/webfs
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2015-11-15 13:09:43 +0100
committerzimbatm <zimbatm@zimbatm.com>2015-11-16 17:29:40 +0100
commit6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f (patch)
tree805e1be8c409e304f41bb1973b9017040102fa80 /pkgs/servers/http/webfs
parent58d870d4b524449f825ca08822a508385c96e2d3 (diff)
downloadnixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.tar
nixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.tar.gz
nixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.tar.bz2
nixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.tar.lz
nixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.tar.xz
nixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.tar.zst
nixpkgs-6a0ed9361b560ba198fc3d1df7e60cfcf3140f9f.zip
webfs: init at 1.21
Diffstat (limited to 'pkgs/servers/http/webfs')
-rw-r--r--pkgs/servers/http/webfs/default.nix27
-rw-r--r--pkgs/servers/http/webfs/ls.c.patch13
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/servers/http/webfs/default.nix b/pkgs/servers/http/webfs/default.nix
new file mode 100644
index 00000000000..b306c73f4a5
--- /dev/null
+++ b/pkgs/servers/http/webfs/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, openssl, shared_mime_info }:
+stdenv.mkDerivation rec {
+  name = "webfs-${version}";
+  version = "1.21";
+
+  src = fetchurl {
+    url = "https://www.kraxel.org/releases/webfs/${name}.tar.gz";
+    sha256 = "98c1cb93473df08e166e848e549f86402e94a2f727366925b1c54ab31064a62a";
+  };
+
+  patches = [ ./ls.c.patch ];
+
+  buildInputs = [ openssl ];
+
+  makeFlags = [
+    "mimefile=${shared_mime_info}/share/mime/globs"
+    "prefix=$(out)"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "HTTP server for purely static content";
+    homepage    = http://linux.bytesex.org/misc/webfs.html;
+    license     = licenses.gpl2;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ zimbatm ];
+  };
+}
diff --git a/pkgs/servers/http/webfs/ls.c.patch b/pkgs/servers/http/webfs/ls.c.patch
new file mode 100644
index 00000000000..78b83b72588
--- /dev/null
+++ b/pkgs/servers/http/webfs/ls.c.patch
@@ -0,0 +1,13 @@
+# Source: homebrew
+# https://raw.githubusercontent.com/Homebrew/patches/0518a6d1/webfs/patch-ls.c
+--- ./ls.c.orig	Fri Oct 15 14:20:50 2004
++++ ./ls.c	Fri Oct 15 14:21:13 2004
+@@ -160,7 +160,7 @@
+     return buf;
+ }
+ 
+-#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__)
+ static void strmode(mode_t mode, char *dest)
+ {
+     static const char *rwx[] = {