mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
viddy: add versionCheckHook
- fix update date by re-running updateScript
- tag -> rev
- fix changelog url
- add __structuredAttrs
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
(cherry picked from commit 587e146b57)
This commit is contained in:
parent
3f68d7ad2a
commit
38357f14e1
1 changed files with 20 additions and 6 deletions
|
|
@ -2,6 +2,7 @@
|
|||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
|
@ -11,26 +12,39 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "sachaos";
|
||||
repo = "viddy";
|
||||
rev = "v${finalAttrs.version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-RyPG8OAg3i9N2Fq5Hij48wMvfQuTNmJFpatvB3HbXKg=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-P+TtxV2kuHeBHr8GQeJ0VWPkjimfcAtBUFt0z79ML6A=";
|
||||
|
||||
env.VERGEN_BUILD_DATE = "2024-11-28"; # managed via the update script
|
||||
env.VERGEN_GIT_DESCRIBE = "Nixpkgs";
|
||||
__structuredAttrs = true;
|
||||
|
||||
passthru.updateScript.command = [ ./update.sh ];
|
||||
env = {
|
||||
VERGEN_BUILD_DATE = "2026-06-14"; # managed via the update script
|
||||
VERGEN_GIT_DESCRIBE = "Nixpkgs";
|
||||
};
|
||||
|
||||
doInstallCheck = true;
|
||||
versionCheckProgramArg = "-V";
|
||||
versionCheckKeepEnvironment = [ "VIDDY_DATA" ];
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
preInstallCheck = ''
|
||||
export VIDDY_DATA="$PWD";
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/sachaos/viddy/releases/tag/${finalAttrs.src.rev}";
|
||||
description = "Modern `watch` command";
|
||||
changelog = "https://github.com/sachaos/viddy/releases";
|
||||
homepage = "https://github.com/sachaos/viddy";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "viddy";
|
||||
maintainers = with lib.maintainers; [
|
||||
j-hui
|
||||
phanirithvij
|
||||
];
|
||||
mainProgram = "viddy";
|
||||
};
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue