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
65 lines
1.5 KiB
Nix
65 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPackages,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
versionCheckHook,
|
|
installShellFiles,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
buildGoModule (finalAttrs: {
|
|
pname = "gibo";
|
|
version = "3.0.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "simonwhitaker";
|
|
repo = "gibo";
|
|
tag = "v${finalAttrs.version}";
|
|
sha256 = "sha256-6w+qhwOHkfKt0hgKO98L6Si0RNJN+CXOOFzGlvxFjcA=";
|
|
};
|
|
|
|
vendorHash = "sha256-pD+7yvBydg1+BQFP0G8rRYTCO//Wg/6pzY19DLs42Gk=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/simonwhitaker/gibo/cmd.version=${finalAttrs.version}"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
|
|
let
|
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
|
in
|
|
''
|
|
installShellCompletion --cmd gibo \
|
|
--bash <(${emulator} $out/bin/gibo completion bash) \
|
|
--fish <(${emulator} $out/bin/gibo completion fish) \
|
|
--zsh <(${emulator} $out/bin/gibo completion zsh)
|
|
''
|
|
);
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
versionCheckProgramArg = "version";
|
|
versionCheckKeepEnvironment = [ "HOME" ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
homepage = "https://github.com/simonwhitaker/gibo";
|
|
license = lib.licenses.unlicense;
|
|
description = "Shell script for easily accessing gitignore boilerplates";
|
|
platforms = lib.platforms.unix;
|
|
mainProgram = "gibo";
|
|
};
|
|
})
|