iamb: cleaning (#365160)

This commit is contained in:
Pol Dellaiera
2024-12-14 23:58:47 +01:00
committed by GitHub
+31 -10
View File
@@ -1,10 +1,11 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
darwin,
stdenv,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
@@ -14,16 +15,28 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "ulyssa";
repo = "iamb";
rev = "v${version}";
tag = "v${version}";
hash = "sha256-cjBSWUBgfwdLnpneJ5XW2TdOFkNc+Rc/wyUp9arZzwg=";
};
cargoHash = "sha256-a5y8nNFixOxJPNDOzvFFRqVrY2jsirCud2ZJJ8OvRhQ=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.AppKit
darwin.apple_sdk.frameworks.Cocoa
preBuild = ''
export HOME=$(mktemp -d)
'';
checkFlags = lib.optionals stdenv.isDarwin [
# Attempted to create a NULL object.
"--skip=base::tests::test_complete_cmdbar"
"--skip=base::tests::test_complete_msgbar"
# Attempted to create a NULL object.
"--skip=windows::room::scrollback::tests::test_cursorpos"
"--skip=windows::room::scrollback::tests::test_dirscroll"
"--skip=windows::room::scrollback::tests::test_movement"
"--skip=windows::room::scrollback::tests::test_search_messages"
];
postInstall = ''
@@ -31,12 +44,20 @@ rustPlatform.buildRustPackage rec {
installManPage $OUT_DIR/iamb.{1,5}
'';
meta = with lib; {
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Matrix client for Vim addicts";
mainProgram = "iamb";
homepage = "https://github.com/ulyssa/iamb";
changelog = "https://github.com/ulyssa/iamb/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ meain ];
changelog = "https://github.com/ulyssa/iamb/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ meain ];
};
}