Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2024-06-26 02:18:26 -04:00
{
lib,
2024-09-15 23:01:50 +02:00
stdenvNoCC,
2024-06-26 02:18:26 -04:00
fetchYarnDeps,
fetchFromGitHub,
2024-09-15 23:01:50 +02:00
yarnConfigHook,
yarnInstallHook,
nodejs,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
2024-06-26 02:18:26 -04:00
pname = "gramma";
version = "1.6.0";
src = fetchFromGitHub {
owner = "caderek";
repo = "gramma";
tag = "v${finalAttrs.version}";
2024-06-26 02:18:26 -04:00
hash = "sha256-gfBwKpsttdhjD/Opn8251qskURpwLX2S5NSbpwP3hFg=";
};
2024-09-15 23:01:50 +02:00
postPatch = ''
# Set a script name to avoid yargs using cli.js as $0
substituteInPlace src/cli.js \
--replace-fail '.demandCommand()' '.demandCommand().scriptName("gramma")'
'';
2024-06-26 02:18:26 -04:00
offlineCache = fetchYarnDeps {
2024-09-15 23:01:50 +02:00
yarnLock = "${finalAttrs.src}/yarn.lock";
2024-06-26 02:18:26 -04:00
hash = "sha256-FuR6wUhAaej/vMgjAlICMEj1pPf+7PFrdu2lTFshIkg=";
};
2024-09-15 23:01:50 +02:00
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
nodejs
];
2024-06-26 02:18:26 -04:00
passthru.updateScript = nix-update-script { };
meta = {
description = "Command-line grammar checker";
2024-06-26 02:18:26 -04:00
homepage = "https://caderek.github.io/gramma/";
2024-09-15 23:01:50 +02:00
changelog = "https://github.com/caderek/gramma/releases/tag/v${finalAttrs.version}";
2024-06-26 02:18:26 -04:00
license = lib.licenses.isc;
mainProgram = "gramma";
maintainers = with lib.maintainers; [ pyrox0 ];
};
2024-09-15 23:01:50 +02:00
})