shaperglot-cli: init at 0-unstable-2025-05-27

Co-authored-by: Aleksana <alexander.huang.y@gmail.com>
This commit is contained in:
Kenichi Kamiya 2025-05-25 12:59:54 +09:00
parent 684d39b21a
commit 73052f6867
No known key found for this signature in database
GPG key ID: 9BE4016A38165CCB

View file

@ -0,0 +1,64 @@
{
lib,
fetchFromGitHub,
rustPlatform,
_experimental-update-script-combinators,
unstableGitUpdater,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "shaperglot-cli";
version = "0-unstable-2025-05-27";
src = fetchFromGitHub {
owner = "googlefonts";
repo = "shaperglot";
rev = "0d934110dfdf315761255e34040f207f7d7868b5";
hash = "sha256-5Bgvx4Yv74nQLd037L5uBj6oySqqp947LI/6yGwYSKY=";
};
cargoHash = "sha256-UMPoPNpyM/+1rq4U6xQ1DF4W+51p5YjQXr/8zLiPvEI=";
cargoBuildFlags = [
"--package=shaperglot-cli"
];
cargoTestFlags = [
"--package=shaperglot-cli"
];
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
describe_output="$("$out/bin/shaperglot" describe English)"
[[ "$describe_output" == *'support'* ]]
runHook postInstallCheck
'';
passthru = {
updateScript = _experimental-update-script-combinators.sequence [
(unstableGitUpdater {
branch = "main";
# Git tag differs from CLI version: https://github.com/googlefonts/shaperglot/issues/138
hardcodeZeroVersion = true;
})
(nix-update-script {
# Updating `cargoHash`
extraArgs = [ "--version=skip" ];
})
];
};
meta = {
description = "Test font files for language support";
homepage = "https://github.com/googlefonts/shaperglot";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
kachick
];
mainProgram = "shaperglot";
};
})