depot/third_party/nixpkgs/pkgs/servers/simple-http-server/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

30 lines
942 B
Nix

{ 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 ];
};
}