2023-01-30 04:26:54 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
2021-04-25 12:53:37 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "simple-http-server";
|
2023-04-24 15:44:55 +02:00
|
|
|
version = "0.6.7";
|
2021-04-25 12:53:37 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TheWaWaR";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-24 15:44:55 +02:00
|
|
|
sha256 = "sha256-Xi5tJIfK4zjckKERhxHuDqeyOB9Dxul/eFLKOtpgR/w=";
|
2021-04-25 12:53:37 +02:00
|
|
|
};
|
|
|
|
|
2023-04-24 15:44:55 +02:00
|
|
|
cargoSha256 = "sha256-wv1hlBTQe1Mm67J2FqrrXSSlZkFPB0TzKc5VUMMfUIQ=";
|
2021-04-25 12:53:37 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2023-01-30 04:26:54 +01:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2021-04-25 12:53:37 +02:00
|
|
|
|
|
|
|
# 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";
|
2022-12-03 21:09:52 +01:00
|
|
|
changelog = "https://github.com/TheWaWaR/simple-http-server/releases/tag/v${version}";
|
2021-04-25 12:53:37 +02:00
|
|
|
license = licenses.mit;
|
2022-09-18 20:02:21 +02:00
|
|
|
maintainers = with maintainers; [ figsoda mephistophiles ];
|
2023-11-27 02:17:53 +01:00
|
|
|
mainProgram = "simple-http-server";
|
2021-04-25 12:53:37 +02:00
|
|
|
};
|
|
|
|
}
|