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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.1 KiB
Nix
Raw Normal View History

2021-10-04 22:35:38 +02:00
{ lib
, rustPlatform
, fetchCrate
, installShellFiles
, makeWrapper
, pkg-config
, ronn
, openssl
, stdenv
, libiconv
, Security
}:
2019-04-27 09:34:33 +02:00
rustPlatform.buildRustPackage rec {
pname = "httplz";
2022-02-26 08:27:35 +01:00
version = "1.12.4";
2019-04-27 09:34:33 +02:00
2021-10-04 22:35:38 +02:00
src = fetchCrate {
inherit version;
pname = "https";
2022-02-26 08:27:35 +01:00
sha256 = "sha256-4+iIFLtPVs4PHOzfXfretCuZ0iBcqMVNnYFjEVhvBjk=";
2019-04-27 09:34:33 +02:00
};
2022-02-26 08:27:35 +01:00
cargoSha256 = "sha256-VOzMf9hOrAEGwtW9h8CnG/Df2KgEVhNqqdL762Gs2dE=";
2021-10-04 22:35:38 +02:00
nativeBuildInputs = [
installShellFiles
makeWrapper
pkg-config
ronn
];
2020-03-29 09:22:38 +02:00
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
2021-10-04 22:35:38 +02:00
libiconv
Security
];
2019-04-27 09:34:33 +02:00
2021-10-04 22:35:38 +02:00
cargoBuildFlags = [ "--bin" "httplz" ];
postInstall = ''
2021-10-04 22:35:38 +02:00
sed -E 's/http(`| |\(|$)/httplz\1/g' http.md > httplz.1.ronn
RUBYOPT=-Eutf-8:utf-8 ronn --organization "http developers" -r httplz.1.ronn
installManPage httplz.1
wrapProgram $out/bin/httplz \
--prefix PATH : "${openssl}/bin"
'';
2019-04-27 09:34:33 +02:00
meta = with lib; {
2019-04-27 09:34:33 +02:00
description = "A basic http server for hosting a folder fast and simply";
homepage = "https://github.com/thecoshman/http";
2019-04-27 09:34:33 +02:00
license = licenses.mit;
2021-10-04 22:35:38 +02:00
maintainers = with maintainers; [ figsoda ];
2019-04-27 09:34:33 +02:00
};
}