mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
3d1e9c31f8
Diff: https://github.com/static-web-server/static-web-server/compare/v2.20.1...v2.20.2 Changelog: https://github.com/static-web-server/static-web-server/blob/v2.20.2/CHANGELOG.md
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin, nixosTests }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "static-web-server";
|
|
version = "2.20.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "static-web-server";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-wC19wEQz/dQDJ+VKgCWhe3zYyxb4JrzmWENgdgSUGi0=";
|
|
};
|
|
|
|
cargoHash = "sha256-q6rwbt4RdE69LxBSP8oDS/sI9Txr5R1tDSnvzQaZMmI=";
|
|
|
|
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"
|
|
];
|
|
|
|
# Need to copy in the systemd units for systemd.packages to discover them
|
|
postInstall = ''
|
|
install -Dm444 -t $out/lib/systemd/system/ systemd/static-web-server.{service,socket}
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) static-web-server; };
|
|
|
|
meta = with lib; {
|
|
description = "An asynchronous web server for static files-serving";
|
|
homepage = "https://static-web-server.net/";
|
|
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 ];
|
|
};
|
|
}
|