blob: e2faec3d3fdb707e070775944b9de5e01d3127f4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
{ lib, buildNpmPackage, fetchFromGitHub, testers, lint-staged }:
buildNpmPackage rec {
pname = "lint-staged";
version = "15.2.0";
src = fetchFromGitHub {
owner = "okonet";
repo = "lint-staged";
rev = "v${version}";
hash = "sha256-Vziz8pV3pd1Rp6X6mHzyD22Z3q5LJJTXQ8kFuHpVgKc=";
};
npmDepsHash = "sha256-BKgncl53MKFDASXo6I2Vn3v54iTL/h9gykJ3PWNUGQU=";
dontNpmBuild = true;
# Fixes `lint-staged --version` output
postPatch = ''
substituteInPlace package.json --replace \
'"version": "0.0.0-development"' \
'"version": "${version}"'
'';
passthru.tests.version = testers.testVersion { package = lint-staged; };
meta = with lib; {
description = "Run linters on git staged files";
longDescription = ''
Run linters against staged git files and don't let 💩 slip into your code base!
'';
homepage = src.meta.homepage;
license = licenses.mit;
maintainers = with maintainers; [ DamienCassou ];
mainProgram = "lint-staged";
};
}
|