1{ lib, stdenv
2, rustPlatform
3, fetchFromGitHub
4, pkg-config
5, openssl
6, libiconv
7, Security
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "monolith";
12 version = "2.7.0";
13
14 src = fetchFromGitHub {
15 owner = "Y2Z";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "sha256-pljMWAfmDQUxQEyFGVhXqLjRq6P7D+YUB/e1h66WnDE=";
19 };
20
21 cargoSha256 = "sha256-kFDyjiupjN1cuhzE16v6JP/yyXdtwL3srZVtSimnahA=";
22
23 nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
24 buildInputs = lib.optionals stdenv.isLinux [ openssl ]
25 ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
26
27 checkFlagsArray = [ "--skip=tests::cli" ];
28
29 meta = with lib; {
30 description = "Bundle any web page into a single HTML file";
31 homepage = "https://github.com/Y2Z/monolith";
32 license = licenses.unlicense;
33 maintainers = with maintainers; [ Br1ght0ne ];
34 };
35}