about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/http/darkhttpd/default.nix
blob: 3efc97f6296bf10c413e27c0c92ac163f3303a95 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "darkhttpd-${version}";
  version = "1.12";

  src = fetchurl {
    url = "https://unix4lyfe.org/darkhttpd/${name}.tar.bz2";
    sha256 = "0185wlyx4iqiwfigp1zvql14zw7gxfacncii3d15yaxk4av1f155";
  };

  enableParallelBuilding = true;

  installPhase = ''
    # install darkhttpd
    install -Dm755 "darkhttpd" "$out/bin/darkhttpd"

    # install license
    install -d "$out/share/licenses/darkhttpd"
    head -n 18 darkhttpd.c > "$out/share/licenses/darkhttpd/LICENSE"
  '';

  meta = with stdenv.lib; {
    description = "Small and secure static webserver";
    homepage    = https://unix4lyfe.org/darkhttpd/;
    license     = licenses.bsd3;
    maintainers = with maintainers; [ bobvanderlinden ];
    platforms   = platforms.all;
  };
}