1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00
nixpkgs/pkgs/by-name/gr/gramma/package.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

2024-06-26 07:18:26 +01:00
{
lib,
2024-09-15 22:01:50 +01:00
stdenvNoCC,
2024-06-26 07:18:26 +01:00
fetchYarnDeps,
fetchFromGitHub,
2024-09-15 22:01:50 +01:00
yarnConfigHook,
yarnInstallHook,
nodejs,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
2024-06-26 07:18:26 +01:00
pname = "gramma";
version = "1.6.0";
src = fetchFromGitHub {
owner = "caderek";
repo = "gramma";
2024-09-15 22:01:50 +01:00
rev = "refs/tags/v${finalAttrs.version}";
2024-06-26 07:18:26 +01:00
hash = "sha256-gfBwKpsttdhjD/Opn8251qskURpwLX2S5NSbpwP3hFg=";
};
2024-09-15 22:01:50 +01: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 07:18:26 +01:00
offlineCache = fetchYarnDeps {
2024-09-15 22:01:50 +01:00
yarnLock = "${finalAttrs.src}/yarn.lock";
2024-06-26 07:18:26 +01:00
hash = "sha256-FuR6wUhAaej/vMgjAlICMEj1pPf+7PFrdu2lTFshIkg=";
};
2024-09-15 22:01:50 +01:00
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
nodejs
];
2024-06-26 07:18:26 +01:00
passthru.updateScript = nix-update-script { };
meta = {
description = "command-line grammar checker";
homepage = "https://caderek.github.io/gramma/";
2024-09-15 22:01:50 +01:00
changelog = "https://github.com/caderek/gramma/releases/tag/v${finalAttrs.version}";
2024-06-26 07:18:26 +01:00
license = lib.licenses.isc;
mainProgram = "gramma";
maintainers = with lib.maintainers; [ pyrox0 ];
};
2024-09-15 22:01:50 +01:00
})