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

35 lines
792 B
Nix
Raw Normal View History

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