2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, rustPlatform
|
2021-02-05 17:12:51 +00:00
|
|
|
, openssl, pkg-config, darwin, libiconv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "httplz";
|
2020-05-03 17:38:23 +00:00
|
|
|
version = "1.9.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thecoshman";
|
|
|
|
repo = "http";
|
|
|
|
rev = "v${version}";
|
2020-05-03 17:38:23 +00:00
|
|
|
sha256 = "154alxxclz78r29m656c8yahnzq0vd64s4sp19h0ca92dfw4s46y";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libiconv darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin httplz" ];
|
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "0r33vg9431jv32r03ryxb3rc4mp6h1kc00d3h1knssfvkwsh31yn";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/httplz \
|
|
|
|
--prefix PATH : "${openssl}/bin"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A basic http server for hosting a folder fast and simply";
|
|
|
|
homepage = "https://github.com/thecoshman/http";
|
|
|
|
license = licenses.mit;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|