Files
nixpkgs/pkgs/by-name/mi/minify/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

57 lines
1.2 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nix-update-script,
testers,
minify,
}:
buildGoModule rec {
pname = "minify";
version = "2.23.1";
src = fetchFromGitHub {
owner = "tdewolff";
repo = "minify";
rev = "v${version}";
hash = "sha256-v0KLQlf2WhI18uanVtvWfX6/7s9ZtfPM5AGyEIHZf54=";
};
vendorHash = "sha256-Btc5d/wwDmjhyDZwAIHDSbXuh8xqq/nIjTAkPsdeHU4=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
];
subPackages = [ "cmd/minify" ];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
inherit version;
package = minify;
command = "minify --version";
};
};
postInstall = ''
installShellCompletion --cmd minify --bash cmd/minify/bash_completion
'';
meta = {
description = "Go minifiers for web formats";
homepage = "https://go.tacodewolff.nl/minify";
downloadPage = "https://github.com/tdewolff/minify";
changelog = "https://github.com/tdewolff/minify/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gaelreyrol ];
mainProgram = "minify";
};
}