nixpkgs/pkgs/tools/networking/httplz/default.nix

38 lines
1020 B
Nix
Raw Normal View History

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