Files
nixpkgs/pkgs/by-name/go/go-crx3/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

59 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-crx3";
version = "1.6.0";
src = fetchFromGitHub {
owner = "mmadfox";
repo = "go-crx3";
tag = "v${finalAttrs.version}";
hash = "sha256-XNUOnm898GtCIojWR4tCHZNDHhh+DfJvvBvTDBI8Wzg=";
};
vendorHash = "sha256-LEIB/VZA3rqTeH9SesZ/jrfVddl6xtmoRWHP+RwGmCk=";
ldflags = [
"-s"
"-w"
];
checkFlags = [
# requires network access
"-skip=^TestDownloadFromWebStore(|Negative)$"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd crx3 \
--bash <($out/bin/crx3 completion bash) \
--fish <($out/bin/crx3 completion fish) \
--zsh <($out/bin/crx3 completion zsh)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/crx3";
versionCheckProgramArg = "version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Chrome browser extension tools";
homepage = "https://github.com/mmadfox/go-crx3";
changelog = "https://github.com/mmadfox/go-crx3/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "crx3";
};
})