2021-02-22 21:28:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "darkhttpd";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "1.14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "emikulic";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-J/tjT3Rfhk5++jbmLBrZu9O4GgTBqeycuz82NliCBxw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-22 21:28:39 +00:00
|
|
|
runHook preInstall
|
2021-01-15 22:18:51 +00:00
|
|
|
install -Dm555 -t $out/bin darkhttpd
|
2021-02-22 21:28:39 +00:00
|
|
|
install -Dm444 -t $out/share/doc/${pname} README.md
|
2021-01-15 22:18:51 +00:00
|
|
|
head -n 18 darkhttpd.c > $out/share/doc/${pname}/LICENSE
|
2021-02-22 21:28:39 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Small and secure static webserver";
|
2021-01-15 22:18:51 +00:00
|
|
|
homepage = "https://unix4lyfe.org/darkhttpd/";
|
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ bobvanderlinden ];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|