nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, openssl }:
2let
3 # Let's not pull the whole apache httpd package
4 mime_file = fetchurl {
5 url = "https://raw.githubusercontent.com/apache/httpd/906e419c1f703360e2e8ec077b393347f993884f/docs/conf/mime.types";
6 sha256 = "ef972fc545cbff4c0daa2b2e6b440859693b3c10435ee90f10fa6fffad800c16";
7 };
8in
9stdenv.mkDerivation rec {
10 pname = "webfs";
11 version = "1.21";
12
13 src = fetchurl {
14 url = "https://www.kraxel.org/releases/webfs/${pname}-${version}.tar.gz";
15 sha256 = "98c1cb93473df08e166e848e549f86402e94a2f727366925b1c54ab31064a62a";
16 };
17
18 patches = [ ./ls.c.patch ];
19
20 buildInputs = [ openssl ];
21
22 makeFlags = [
23 "mimefile=${mime_file}"
24 "prefix=$(out)"
25 ];
26
27 meta = with lib; {
28 description = "HTTP server for purely static content";
29 homepage = "http://linux.bytesex.org/misc/webfs.html";
30 license = licenses.gpl2;
31 platforms = platforms.all;
32 maintainers = with maintainers; [ zimbatm ];
33 mainProgram = "webfsd";
34 };
35}