nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 54 lines 1.2 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchCrate, 5 installShellFiles, 6 makeWrapper, 7 pkg-config, 8 ronn, 9 openssl, 10}: 11 12rustPlatform.buildRustPackage rec { 13 pname = "httplz"; 14 version = "1.13.2"; 15 16 src = fetchCrate { 17 inherit version; 18 pname = "https"; 19 hash = "sha256-uxEMgSrcxMZD/3GQuH9S/oYtMUPzgMR61ZzLcb65zXU="; 20 }; 21 22 cargoHash = "sha256-DXSHaiiIRdyrlX4UYPFD3aTAv65k3x/PU2VW047odH0="; 23 24 nativeBuildInputs = [ 25 installShellFiles 26 makeWrapper 27 pkg-config 28 ronn 29 ]; 30 31 buildInputs = [ openssl ]; 32 33 cargoBuildFlags = [ 34 "--bin" 35 "httplz" 36 ]; 37 38 postInstall = '' 39 sed -E 's/http(`| |\(|$)/httplz\1/g' http.md > httplz.1.ronn 40 RUBYOPT=-Eutf-8:utf-8 ronn --organization "http developers" -r httplz.1.ronn 41 installManPage httplz.1 42 wrapProgram $out/bin/httplz \ 43 --prefix PATH : "${openssl}/bin" 44 ''; 45 46 meta = { 47 description = "Basic http server for hosting a folder fast and simply"; 48 mainProgram = "httplz"; 49 homepage = "https://github.com/thecoshman/http"; 50 changelog = "https://github.com/thecoshman/http/releases/tag/v${version}"; 51 license = lib.licenses.mit; 52 maintainers = with lib.maintainers; [ figsoda ]; 53 }; 54}