Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 39 lines 985 B view raw
1{ lib 2, rustPlatform 3, fetchFromGitHub 4, pkg-config 5, openssl 6, stdenv 7, darwin 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "simple-http-server"; 12 version = "0.6.7"; 13 14 src = fetchFromGitHub { 15 owner = "TheWaWaR"; 16 repo = pname; 17 rev = "v${version}"; 18 sha256 = "sha256-Xi5tJIfK4zjckKERhxHuDqeyOB9Dxul/eFLKOtpgR/w="; 19 }; 20 21 cargoSha256 = "sha256-wv1hlBTQe1Mm67J2FqrrXSSlZkFPB0TzKc5VUMMfUIQ="; 22 23 nativeBuildInputs = [ pkg-config ]; 24 25 buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ 26 darwin.apple_sdk.frameworks.Security 27 ]; 28 29 # Currently no tests are implemented, so we avoid building the package twice 30 doCheck = false; 31 32 meta = with lib; { 33 description = "Simple HTTP server in Rust"; 34 homepage = "https://github.com/TheWaWaR/simple-http-server"; 35 changelog = "https://github.com/TheWaWaR/simple-http-server/releases/tag/v${version}"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ figsoda mephistophiles ]; 38 }; 39}