44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "tailspin";
|
|
version = "5.4.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bensadeh";
|
|
repo = "tailspin";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-Cl1S183iAyFPa3KijHCn/CyRXQBluphNMQFAgdIOzuM=";
|
|
};
|
|
|
|
cargoHash = "sha256-2p4jkta6w2vje169KCHw0ErC7FweLabF6B7ZIkTmNBI=";
|
|
|
|
postPatch = ''
|
|
substituteInPlace tests/utils.rs --replace-fail \
|
|
'target/debug' "target/${stdenv.hostPlatform.rust.rustcTargetSpec}/$cargoCheckType"
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgram = "${placeholder "out"}/bin/tspin";
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Log file highlighter";
|
|
homepage = "https://github.com/bensadeh/tailspin";
|
|
changelog = "https://github.com/bensadeh/tailspin/blob/${finalAttrs.version}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ dit7ya ];
|
|
mainProgram = "tspin";
|
|
};
|
|
})
|