about summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2015-11-28 14:22:33 +0000
committerzimbatm <zimbatm@zimbatm.com>2015-11-28 14:24:21 +0000
commit138a42dd11f520b114cbc1727b6f6f0825680b1d (patch)
tree4613cab105d6a815a5a12d2d3840f6c34c1052f3 /pkgs/servers/http
parent054402d479b35c4a109549e6d37a8ded7ab65f73 (diff)
downloadnixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.tar
nixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.tar.gz
nixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.tar.bz2
nixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.tar.lz
nixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.tar.xz
nixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.tar.zst
nixlib-138a42dd11f520b114cbc1727b6f6f0825680b1d.zip
webfs: fix mime types
Unfortunately the shared_mime_info format is not compatible with webfs.

Instead of pulling the whole httpd package I opted for just fetching the
mime.types file from the apache httpd project.
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/webfs/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/servers/http/webfs/default.nix b/pkgs/servers/http/webfs/default.nix
index b306c73f4a50..3fb3890f9c4e 100644
--- a/pkgs/servers/http/webfs/default.nix
+++ b/pkgs/servers/http/webfs/default.nix
@@ -1,4 +1,11 @@
-{ stdenv, fetchurl, openssl, shared_mime_info }:
+{ stdenv, fetchurl, openssl }:
+let
+  # Let's not pull the whole apache httpd package
+  mime_file = fetchurl {
+    url = https://raw.githubusercontent.com/apache/httpd/906e419c1f703360e2e8ec077b393347f993884f/docs/conf/mime.types;
+    sha256 = "ef972fc545cbff4c0daa2b2e6b440859693b3c10435ee90f10fa6fffad800c16";
+  };
+in
 stdenv.mkDerivation rec {
   name = "webfs-${version}";
   version = "1.21";
@@ -13,7 +20,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ openssl ];
 
   makeFlags = [
-    "mimefile=${shared_mime_info}/share/mime/globs"
+    "mimefile=${mime_file}"
     "prefix=$(out)"
   ];