2024-08-28 08:01:13 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildNpmPackage,
|
|
|
|
fetchFromGitHub,
|
2024-09-07 22:26:44 +00:00
|
|
|
stdenv,
|
|
|
|
overrideSDK,
|
2024-08-28 08:01:13 +00:00
|
|
|
}:
|
2024-09-07 22:26:44 +00:00
|
|
|
let
|
|
|
|
buildNpmPackage' = buildNpmPackage.override {
|
|
|
|
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
buildNpmPackage' rec {
|
2024-08-28 08:01:13 +00:00
|
|
|
pname = "eslint";
|
2024-09-07 22:45:42 +00:00
|
|
|
version = "9.10.0";
|
2024-08-28 08:01:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eslint";
|
|
|
|
repo = "eslint";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-07 22:45:42 +00:00
|
|
|
hash = "sha256-R5DO4xN3PkwGAIfyMkohs9SvFiLjWf1ddOwkY6wbsjA=";
|
2024-08-28 08:01:13 +00:00
|
|
|
};
|
|
|
|
|
2024-09-07 22:26:44 +00: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 08:01:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${./package-lock.json} package-lock.json
|
|
|
|
'';
|
|
|
|
|
2024-09-07 22:45:42 +00:00
|
|
|
npmDepsHash = "sha256-Nrcld0ONfjdSh/ItdbDMp6dXVFKoj83aaoGXDgoNE60=";
|
2024-08-28 08:01:13 +00:00
|
|
|
|
|
|
|
dontNpmBuild = true;
|
|
|
|
dontNpmPrune = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Find and fix problems in your JavaScript code";
|
|
|
|
homepage = "https://eslint.org";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.onny ];
|
|
|
|
};
|
|
|
|
}
|