1 { buildPackages, cmake, fetchFromGitHub, lib, ninja, stdenv, testers, quick-lint-js }:
6 src = fetchFromGitHub {
8 repo = "quick-lint-js";
10 hash = "sha256-L2LCRm1Fsg+xRdPc8YmgxDnuXJo92nxs862ewzObZ3I=";
13 quick-lint-js-build-tools = buildPackages.stdenv.mkDerivation {
14 pname = "quick-lint-js-build-tools";
17 nativeBuildInputs = [ cmake ninja ];
21 "-DQUICK_LINT_JS_ENABLE_BUILD_TOOLS=ON"
22 # Temporary workaround for https://github.com/NixOS/nixpkgs/pull/108496#issuecomment-1192083379
23 "-DCMAKE_SKIP_BUILD_RPATH=ON"
25 ninjaFlags = "quick-lint-js-build-tools";
29 cmake --install . --component build-tools
34 stdenv.mkDerivation rec {
35 pname = "quick-lint-js";
38 nativeBuildInputs = [ cmake ninja ];
42 "-DQUICK_LINT_JS_USE_BUILD_TOOLS=${quick-lint-js-build-tools}/bin"
43 # Temporary workaround for https://github.com/NixOS/nixpkgs/pull/108496#issuecomment-1192083379
44 "-DCMAKE_SKIP_BUILD_RPATH=ON"
48 version = testers.testVersion { package = quick-lint-js; };
52 description = "Find bugs in Javascript programs";
53 mainProgram = "quick-lint-js";
54 homepage = "https://quick-lint-js.com";
55 license = licenses.gpl3Plus;
56 maintainers = with maintainers; [ ratsclub ];
57 platforms = platforms.all;
60 # Expose quick-lint-js-build-tools to nix repl as quick-lint-js.build-tools.
61 passthru.build-tools = quick-lint-js-build-tools;