nixpkgs/pkgs/servers/http/darkhttpd/default.nix

35 lines
792 B
Nix
Raw Normal View History

2021-02-21 20:15:49 +03:00
{ lib
, stdenv
, fetchFromGitHub
}:
2015-11-19 16:46:59 +03:00
stdenv.mkDerivation rec {
pname = "darkhttpd";
2021-02-21 20:15:49 +03:00
version = "1.13";
2015-11-19 16:46:59 +03:00
2021-02-21 20:15:49 +03:00
src = fetchFromGitHub {
owner = "emikulic";
repo = pname;
rev = "v${version}";
sha256 = "0w11xq160q9yyffv4mw9ncp1n0dl50d9plmwxb0yijaaxls9i4sk";
2015-11-19 16:46:59 +03:00
};
2017-08-28 16:19:40 +03:00
enableParallelBuilding = true;
2015-11-19 16:46:59 +03:00
2017-08-28 16:19:40 +03:00
installPhase = ''
2021-02-21 20:15:49 +03:00
runHook preInstall
2021-01-14 05:51:14 +03:00
install -Dm555 -t $out/bin darkhttpd
2021-02-21 20:15:49 +03:00
install -Dm444 -t $out/share/doc/${pname} README.md
2021-01-14 05:51:14 +03:00
head -n 18 darkhttpd.c > $out/share/doc/${pname}/LICENSE
2021-02-21 20:15:49 +03:00
runHook postInstall
2015-11-19 16:46:59 +03:00
'';
meta = with lib; {
2015-11-19 16:46:59 +03:00
description = "Small and secure static webserver";
2021-01-14 05:51:14 +03:00
homepage = "https://unix4lyfe.org/darkhttpd/";
license = licenses.bsd3;
2017-08-28 16:19:40 +03:00
maintainers = with maintainers; [ bobvanderlinden ];
2021-01-14 05:51:14 +03:00
platforms = platforms.all;
2015-11-19 16:46:59 +03:00
};
}