depot/third_party/nixpkgs/pkgs/tools/networking/httplz/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

35 lines
1,001 B
Nix

{ stdenv, lib, fetchFromGitHub, makeWrapper, rustPlatform
, openssl, pkg-config, darwin, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "httplz";
version = "1.9.2";
src = fetchFromGitHub {
owner = "thecoshman";
repo = "http";
rev = "v${version}";
sha256 = "154alxxclz78r29m656c8yahnzq0vd64s4sp19h0ca92dfw4s46y";
};
nativeBuildInputs = [ makeWrapper pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
libiconv darwin.apple_sdk.frameworks.Security
];
cargoBuildFlags = [ "--bin httplz" ];
cargoPatches = [ ./cargo-lock.patch ];
cargoSha256 = "1rpwzrr9bvw375vn97y5fqhraqz35d3ani9kfflvn2758x3g8gwf";
postInstall = ''
wrapProgram $out/bin/httplz \
--prefix PATH : "${openssl}/bin"
'';
meta = with lib; {
description = "A basic http server for hosting a folder fast and simply";
homepage = "https://github.com/thecoshman/http";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}