Files
nixpkgs/pkgs/by-name/fe/ferron/package.nix
2026-06-18 16:01:13 +02:00

64 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
zstd,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ferron";
version = "2.8.1";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "ferronweb";
repo = "ferron";
tag = finalAttrs.version;
hash = "sha256-69rCgyUjEbInTmgZMU6uNuahaqSVcaIOWFVSGC9in28=";
};
# ../../ is cargoDepsCopy, and obviously does not contain monoio's README.md
postPatch = ''
substituteInPlace $cargoDepsCopy/*/monoio-0.2.4/src/lib.rs \
--replace-fail '#![doc = include_str!("../../README.md")]' ""
'';
cargoHash = "sha256-H6AMHYlUdlCFAzOcso5V7uagB1Is304TuXR6+IrqWOU=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
zstd
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Fast, memory-safe web server written in Rust";
homepage = "https://github.com/ferronweb/ferron";
changelog = "https://github.com/ferronweb/ferron/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
_0x4A6F
GaetanLepage
];
mainProgram = "ferron";
};
})