Files
nixpkgs/pkgs/by-name/mi/minhtml/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

44 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "minhtml";
version = "0.16.4";
src = fetchFromGitHub {
owner = "wilsonzlin";
repo = "minify-html";
tag = "v${finalAttrs.version}";
hash = "sha256-SoCSHhgTLfztSfvzxxpZn/nQpXbKlkE4iiP0YZ0MVjY=";
};
# Upstream does not include a lock file so one has to be patched in.
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
# Ensures that only the correct package gets built, as upstream contains multiple.
cargoBuildFlags = [
"-p"
"minhtml"
];
cargoTestFlags = [
"-p"
"minhtml"
];
meta = {
description = "Minifier for HTML, JavaScript, and CSS";
mainProgram = "minhtml";
homepage = "https://github.com/wilsonzlin/minify-html";
changelog = "https://github.com/wilsonzlin/minify-html/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tye-exe ];
};
})