2022-12-18 04:18:56 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "static-web-server";
|
2023-04-25 13:51:19 +00:00
|
|
|
version = "2.16.0";
|
2022-12-18 04:18:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "static-web-server";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-25 13:51:19 +00:00
|
|
|
sha256 = "sha256-ZHJGUgFCguUszcpzXwAK1XH3Ds4b87pyiohabvIwMX4=";
|
2022-12-18 04:18:56 +00:00
|
|
|
};
|
|
|
|
|
2023-04-25 13:51:19 +00:00
|
|
|
cargoHash = "sha256-7JOJknBJuX0anzd6Oqp3HEzYtEQfRkcHdjNBzW59P+E=";
|
2022-12-18 04:18:56 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# TODO: investigate why these tests fail
|
|
|
|
"--skip=tests::handle_byte_ranges_if_range_too_old"
|
|
|
|
"--skip=tests::handle_not_modified"
|
|
|
|
"--skip=handle_precondition"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An asynchronus web server for static files-serving";
|
2023-04-25 13:51:19 +00:00
|
|
|
homepage = "https://static-web-server.net/";
|
2022-12-18 04:18:56 +00:00
|
|
|
changelog = "https://github.com/static-web-server/static-web-server/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|