2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, zlib
|
2021-03-23 19:22:30 +00:00
|
|
|
, libiconv
|
2020-04-24 23:36:52 +00:00
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "miniserve";
|
2021-03-23 19:22:30 +00:00
|
|
|
version = "0.12.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svenstaro";
|
|
|
|
repo = "miniserve";
|
|
|
|
rev = "v${version}";
|
2021-03-23 19:22:30 +00:00
|
|
|
sha256 = "sha256-hTNwEspM1qlQkC6lD7N947tvS7O7RCIUYACvj4KYsAY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
cargoSha256 = "sha256-7G+h+g00T/aJ1cQ1SChxy8dq3CWWdHlx5DAH77xM9Oc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config zlib ];
|
2021-03-23 19:22:30 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
|
|
|
|
checkFlags = [ "--skip=cant_navigate_up_the_root" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "For when you really just want to serve some files over HTTP right now!";
|
|
|
|
homepage = "https://github.com/svenstaro/miniserve";
|
|
|
|
license = with licenses; [ mit ];
|
2020-10-11 12:50:04 +00:00
|
|
|
maintainers = with maintainers; [ zowoq ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|