3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/httplz/default.nix

36 lines
1,001 B
Nix
Raw Normal View History

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