2021-02-22 21:28:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "darkhttpd";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.15";
|
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}";
|
2024-01-25 14:12:00 +00:00
|
|
|
sha256 = "sha256-G1lh3nHo2iU/dkiBykl5+DSIC2c6SCqqv42Bw0Frz3A=";
|
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
|
|
|
};
|
|
|
|
}
|