nixpkgs/pkgs/by-name/es/eslint/package.nix

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

45 lines
1.0 KiB
Nix
Raw Normal View History

2024-08-28 10:01:13 +02:00
{
lib,
buildNpmPackage,
fetchFromGitHub,
2025-07-05 02:32:45 -04:00
nix-update-script,
2024-09-07 17:26:44 -05:00
stdenv,
2024-08-28 10:01:13 +02:00
}:
buildNpmPackage rec {
2024-08-28 10:01:13 +02:00
pname = "eslint";
2025-08-02 18:09:34 +00:00
version = "9.32.0";
2024-08-28 10:01:13 +02:00
src = fetchFromGitHub {
owner = "eslint";
repo = "eslint";
tag = "v${version}";
2025-08-02 18:09:34 +00:00
hash = "sha256-ORqkolpd5B2mZ5lpePHU3RCpUHnl2p9ugMe2+A8sauA=";
2024-08-28 10:01:13 +02:00
};
2024-09-07 17:26:44 -05:00
# NOTE: Generating lock-file
# arch = [ x64 arm64 ]
# platform = [ darwin linux]
# npm install --package-lock-only --arch=<arch> --platform=<os>
# darwin seems to generate a cross platform compatible lockfile
2024-08-28 10:01:13 +02:00
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
2025-08-02 18:09:34 +00:00
npmDepsHash = "sha256-9IWGjPwvZFPlbClQ5XRx0clN0HD6eyggX+v5mtU0exQ=";
npmInstallFlags = [ "--omit=dev" ];
2024-08-28 10:01:13 +02:00
dontNpmBuild = true;
dontNpmPrune = true;
2025-07-05 02:32:45 -04:00
passthru.updateScript = nix-update-script {
extraArgs = [ "--generate-lockfile" ];
};
2024-08-28 10:01:13 +02:00
meta = {
description = "Find and fix problems in your JavaScript code";
homepage = "https://eslint.org";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.onny ];
};
}