2019-09-14 11:57:14 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, rustPlatform
|
|
|
|
, openssl, pkgconfig, darwin, libiconv }:
|
2019-04-27 09:34:33 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "httplz";
|
2020-01-24 21:29:06 +01:00
|
|
|
version = "1.8.0";
|
2019-04-27 09:34:33 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thecoshman";
|
|
|
|
repo = "http";
|
|
|
|
rev = "v${version}";
|
2020-01-24 21:29:06 +01:00
|
|
|
sha256 = "0i41hqig8v6w1qb6498239iix1rss0lznm5lcl9m3i439c2zv7pw";
|
2019-04-27 09:34:33 +02:00
|
|
|
};
|
|
|
|
|
2019-09-14 11:57:14 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
|
|
|
openssl pkgconfig
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libiconv darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2019-04-27 09:34:33 +02:00
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin httplz" ];
|
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
2020-02-14 03:00:26 +01:00
|
|
|
# Delete this on next update; see #79975 for details
|
|
|
|
legacyCargoFetcher = true;
|
|
|
|
|
2020-01-24 21:29:06 +01:00
|
|
|
cargoSha256 = "1ajxfvj1pv6yq84zgrh7vjzghpb2y8qd5r09gzwdvww5rbj920fq";
|
2019-09-14 11:57:14 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/httplz \
|
|
|
|
--prefix PATH : "${openssl}/bin"
|
|
|
|
'';
|
2019-04-27 09:34:33 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A basic http server for hosting a folder fast and simply";
|
2019-09-14 11:57:14 +02:00
|
|
|
homepage = "https://github.com/thecoshman/http";
|
2019-04-27 09:34:33 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bbigras ];
|
|
|
|
};
|
|
|
|
}
|