nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4}:
5
6stdenv.mkDerivation rec {
7 pname = "darkhttpd";
8 version = "1.14";
9
10 src = fetchFromGitHub {
11 owner = "emikulic";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "sha256-J/tjT3Rfhk5++jbmLBrZu9O4GgTBqeycuz82NliCBxw=";
15 };
16
17 enableParallelBuilding = true;
18
19 installPhase = ''
20 runHook preInstall
21 install -Dm555 -t $out/bin darkhttpd
22 install -Dm444 -t $out/share/doc/${pname} README.md
23 head -n 18 darkhttpd.c > $out/share/doc/${pname}/LICENSE
24 runHook postInstall
25 '';
26
27 meta = with lib; {
28 description = "Small and secure static webserver";
29 homepage = "https://unix4lyfe.org/darkhttpd/";
30 license = licenses.bsd3;
31 maintainers = with maintainers; [ bobvanderlinden ];
32 platforms = platforms.all;
33 };
34}