diff options
Diffstat (limited to 'pkgs/by-name/ko/komac/package.nix')
-rw-r--r-- | pkgs/by-name/ko/komac/package.nix | 72 |
1 files changed, 44 insertions, 28 deletions
diff --git a/pkgs/by-name/ko/komac/package.nix b/pkgs/by-name/ko/komac/package.nix index 61f41cd5c58d..93f251abdf11 100644 --- a/pkgs/by-name/ko/komac/package.nix +++ b/pkgs/by-name/ko/komac/package.nix @@ -1,14 +1,17 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, openssl -, rustPlatform -, darwin -, testers -, komac -, dbus -, zstd +{ + lib, + stdenv, + fetchFromGitHub, + pkg-config, + openssl, + rustPlatform, + darwin, + testers, + komac, + dbus, + zstd, + versionCheckHook, + nix-update-script, }: let @@ -16,7 +19,7 @@ let src = fetchFromGitHub { owner = "russellbanks"; repo = "Komac"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-YFaa2kU42NlhRivBEPV1mSr3j95P4NFwUKM0Xx8tpfg="; }; in @@ -29,14 +32,16 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - dbus - openssl - zstd - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.Security - darwin.apple_sdk.frameworks.SystemConfiguration - ]; + buildInputs = + [ + dbus + openssl + zstd + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.SystemConfiguration + ]; env = { OPENSSL_NO_VENDOR = true; @@ -44,19 +49,30 @@ rustPlatform.buildRustPackage { ZSTD_SYS_USE_PKG_CONFIG = true; }; - passthru.tests.version = testers.testVersion { - inherit version; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgram = "${placeholder "out"}/bin/komac"; - package = komac; - command = "komac --version"; + passthru = { + tests.version = testers.testVersion { + inherit version; + + package = komac; + command = "komac --version"; + }; + + updateScript = nix-update-script { }; }; - meta = with lib; { + meta = { description = "Community Manifest Creator for WinGet"; homepage = "https://github.com/russellbanks/Komac"; - changelog = "https://github.com/russellbanks/Komac/releases/tag/${src.rev}"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ kachick HeitorAugustoLN ]; + changelog = "https://github.com/russellbanks/Komac/releases/tag/v${version}"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ + kachick + HeitorAugustoLN + ]; mainProgram = "komac"; }; } |