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

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

54 lines
1.2 KiB
Nix
Raw Normal View History

2021-10-04 20:35:38 +00:00
{ lib
, rustPlatform
, fetchCrate
, installShellFiles
, makeWrapper
, pkg-config
, ronn
, openssl
, stdenv
2023-03-21 12:39:50 +00:00
, darwin
2021-10-04 20:35:38 +00:00
}:
2019-04-27 07:34:33 +00:00
rustPlatform.buildRustPackage rec {
pname = "httplz";
version = "1.13.2";
2019-04-27 07:34:33 +00:00
2021-10-04 20:35:38 +00:00
src = fetchCrate {
inherit version;
pname = "https";
hash = "sha256-uxEMgSrcxMZD/3GQuH9S/oYtMUPzgMR61ZzLcb65zXU=";
2019-04-27 07:34:33 +00:00
};
cargoHash = "sha256-8cH8QrnkfPF0Di7+Ns/P/8cFe0jej/v7m4fkkfTFdvs=";
2021-10-04 20:35:38 +00:00
nativeBuildInputs = [
installShellFiles
makeWrapper
pkg-config
ronn
];
2020-03-29 07:22:38 +00:00
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
2023-03-21 12:39:50 +00:00
darwin.apple_sdk.frameworks.Security
];
2019-04-27 07:34:33 +00:00
2021-10-04 20:35:38 +00:00
cargoBuildFlags = [ "--bin" "httplz" ];
postInstall = ''
2021-10-04 20:35:38 +00: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 07:34:33 +00:00
meta = with lib; {
2019-04-27 07:34:33 +00:00
description = "A basic http server for hosting a folder fast and simply";
homepage = "https://github.com/thecoshman/http";
changelog = "https://github.com/thecoshman/http/releases/tag/v${version}";
2019-04-27 07:34:33 +00:00
license = licenses.mit;
2021-10-04 20:35:38 +00:00
maintainers = with maintainers; [ figsoda ];
2019-04-27 07:34:33 +00:00
};
}