Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 34 lines 1.0 kB view raw
1{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "static-web-server"; 5 version = "2.18.0"; 6 7 src = fetchFromGitHub { 8 owner = "static-web-server"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-UV4H2M1QMayFxZDeN4+huIE+D9C5XhsCrKdGs77yOi4="; 12 }; 13 14 cargoHash = "sha256-PXkKs0Q4IviihzWHob4BTvHLcql+cLLtZvNVt8IgvK0="; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ 17 darwin.apple_sdk.frameworks.Security 18 ]; 19 20 checkFlags = [ 21 # TODO: investigate why these tests fail 22 "--skip=tests::handle_byte_ranges_if_range_too_old" 23 "--skip=tests::handle_not_modified" 24 "--skip=handle_precondition" 25 ]; 26 27 meta = with lib; { 28 description = "An asynchronus web server for static files-serving"; 29 homepage = "https://static-web-server.net/"; 30 changelog = "https://github.com/static-web-server/static-web-server/blob/v${version}/CHANGELOG.md"; 31 license = with licenses; [ mit /* or */ asl20 ]; 32 maintainers = with maintainers; [ figsoda ]; 33 }; 34}