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
70 lines
1.7 KiB
Nix
70 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
testers,
|
|
runCommand,
|
|
writeText,
|
|
nix-update-script,
|
|
brush,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "brush";
|
|
version = "0.2.23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "reubeno";
|
|
repo = "brush";
|
|
tag = "brush-shell-v${version}";
|
|
hash = "sha256-b3foza29ty4P09PaBFh1nmGyn1YsxNPiVQHUcwWo6Lg=";
|
|
};
|
|
|
|
cargoHash = "sha256-+HUZNOPPyRn2tQel/8fIiRQo761G3ygfRPuvjHkRAV8=";
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
doInstallCheck = true;
|
|
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
|
|
versionCheckProgramArg = "--version";
|
|
|
|
# Found argument '--test-threads' which wasn't expected, or isn't valid in this context
|
|
doCheck = false;
|
|
|
|
passthru = {
|
|
shellPath = "/bin/brush";
|
|
|
|
tests = {
|
|
complete = testers.testEqualContents {
|
|
assertion = "brushinfo performs to inspect completions";
|
|
expected = writeText "expected" ''
|
|
brush
|
|
brushctl
|
|
brushinfo
|
|
'';
|
|
actual =
|
|
runCommand "actual"
|
|
{
|
|
nativeBuildInputs = [ brush ];
|
|
}
|
|
''
|
|
brush -c 'brushinfo complete line bru' >$out
|
|
'';
|
|
};
|
|
};
|
|
|
|
updateScript = nix-update-script { extraArgs = [ "--version-regex=brush-shell-v([\\d\\.]+)" ]; };
|
|
};
|
|
|
|
meta = {
|
|
description = "Bash/POSIX-compatible shell implemented in Rust";
|
|
homepage = "https://github.com/reubeno/brush";
|
|
changelog = "https://github.com/reubeno/brush/blob/${src.tag}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ kachick ];
|
|
mainProgram = "brush";
|
|
};
|
|
}
|