Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchYarnDeps,
|
|
fetchFromGitHub,
|
|
yarnConfigHook,
|
|
yarnInstallHook,
|
|
nodejs,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "gramma";
|
|
version = "1.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "caderek";
|
|
repo = "gramma";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-gfBwKpsttdhjD/Opn8251qskURpwLX2S5NSbpwP3hFg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Set a script name to avoid yargs using cli.js as $0
|
|
substituteInPlace src/cli.js \
|
|
--replace-fail '.demandCommand()' '.demandCommand().scriptName("gramma")'
|
|
'';
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
yarnLock = "${finalAttrs.src}/yarn.lock";
|
|
hash = "sha256-FuR6wUhAaej/vMgjAlICMEj1pPf+7PFrdu2lTFshIkg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
yarnConfigHook
|
|
yarnInstallHook
|
|
nodejs
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Command-line grammar checker";
|
|
homepage = "https://caderek.github.io/gramma/";
|
|
changelog = "https://github.com/caderek/gramma/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.isc;
|
|
mainProgram = "gramma";
|
|
maintainers = with lib.maintainers; [ pyrox0 ];
|
|
};
|
|
})
|