Files
nixpkgs/pkgs/by-name/bo/bootdev-cli/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

58 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nix-update-script,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
buildGoModule rec {
pname = "bootdev-cli";
version = "1.20.4";
src = fetchFromGitHub {
owner = "bootdotdev";
repo = "bootdev";
tag = "v${version}";
hash = "sha256-ayjHhnnP6YWKMItsAw+nnScf1/eEHN2f7cOIkskE3mM=";
};
vendorHash = "sha256-jhRoPXgfntDauInD+F7koCaJlX4XDj+jQSe/uEEYIMM=";
ldflags = [
"-s"
"-w"
];
nativeBuildInputs = [
installShellFiles
writableTmpDirAsHomeHook
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd bootdev \
--bash <($out/bin/bootdev completion bash) \
--zsh <($out/bin/bootdev completion zsh) \
--fish <($out/bin/bootdev completion fish)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/bootdev";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI used to complete coding challenges and lessons on Boot.dev";
homepage = "https://github.com/bootdotdev/bootdev";
changelog = "https://github.com/bootdotdev/bootdev/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ vinnymeller ];
mainProgram = "bootdev";
};
}