1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 18:03:22 +00:00
nixpkgs/pkgs/tools/networking/httplz/default.nix

38 lines
1,020 B
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, makeWrapper, rustPlatform
, openssl, pkgconfig, darwin, libiconv }:
2019-04-27 08:34:33 +01:00
rustPlatform.buildRustPackage rec {
pname = "httplz";
2020-01-24 20:29:06 +00:00
version = "1.8.0";
2019-04-27 08:34:33 +01:00
src = fetchFromGitHub {
owner = "thecoshman";
repo = "http";
rev = "v${version}";
2020-01-24 20:29:06 +00:00
sha256 = "0i41hqig8v6w1qb6498239iix1rss0lznm5lcl9m3i439c2zv7pw";
2019-04-27 08:34:33 +01:00
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
openssl pkgconfig
] ++ 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 ];
cargoSha256 = "13hk9m09jff3bxbixsjvksiir4j4mak4ckvlq45bx5d5lh8sapxl";
postInstall = ''
wrapProgram $out/bin/httplz \
--prefix PATH : "${openssl}/bin"
'';
2019-04-27 08:34:33 +01: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 08:34:33 +01:00
license = licenses.mit;
maintainers = with maintainers; [ bbigras ];
};
}