miniserve: use finalAttrs pattern

This commit is contained in:
Defelo 2025-05-30 00:21:48 +02:00
parent d0be8ff242
commit ecb9bc83b2
No known key found for this signature in database
GPG key ID: 2A05272471204DD3

View file

@ -7,27 +7,23 @@
curl, curl,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage (finalAttrs: {
pname = "miniserve"; pname = "miniserve";
version = "0.28.0"; version = "0.28.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "svenstaro"; owner = "svenstaro";
repo = "miniserve"; repo = "miniserve";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-jrQnmIYap5eHVWPqoRsXVroB0VWLKxesi3rB/WylR0U="; hash = "sha256-jrQnmIYap5eHVWPqoRsXVroB0VWLKxesi3rB/WylR0U=";
}; };
useFetchCargoVendor = true; useFetchCargoVendor = true;
cargoHash = "sha256-SosRbtk5gBcOVropy+HVFFmLLexu29GjchC6zFweiYw="; cargoHash = "sha256-SosRbtk5gBcOVropy+HVFFmLLexu29GjchC6zFweiYw=";
nativeBuildInputs = [ nativeBuildInputs = [ installShellFiles ];
installShellFiles
];
nativeCheckInputs = [ nativeCheckInputs = [ curl ];
curl
];
checkFlags = [ checkFlags = [
"--skip=bind_ipv4_ipv6::case_2" "--skip=bind_ipv4_ipv6::case_2"
@ -52,9 +48,9 @@ rustPlatform.buildRustPackage rec {
meta = { meta = {
description = "CLI tool to serve files and directories over HTTP"; description = "CLI tool to serve files and directories over HTTP";
homepage = "https://github.com/svenstaro/miniserve"; homepage = "https://github.com/svenstaro/miniserve";
changelog = "https://github.com/svenstaro/miniserve/blob/v${version}/CHANGELOG.md"; changelog = "https://github.com/svenstaro/miniserve/blob/v${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [ mit ]; license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ figsoda ]; maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "miniserve"; mainProgram = "miniserve";
}; };
} })