{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, stdenv, Security }: rustPlatform.buildRustPackage rec { pname = "simple-http-server"; version = "0.6.5"; src = fetchFromGitHub { owner = "TheWaWaR"; repo = pname; rev = "v${version}"; sha256 = "sha256-9wssSegekRBUXxpru5WGGu6BLX6BFEgV0QliNJToRFg="; }; cargoSha256 = "sha256-P8Zr5KTjXD0qHkf6QfyfN39PjokpZUfywhzVjIO5rE8="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; # Currently no tests are implemented, so we avoid building the package twice doCheck = false; meta = with lib; { description = "Simple HTTP server in Rust"; homepage = "https://github.com/TheWaWaR/simple-http-server"; changelog = "https://github.com/TheWaWaR/simple-http-server/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ figsoda mephistophiles ]; }; }