aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix24
1 files changed, 23 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index a1fc947b7..c160daed9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,5 +1,5 @@
{
- description = "The purely functional package manager";
+ description = "Lix: A modern, delicious implementation of the Nix package manager";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05-small";
@@ -197,6 +197,8 @@
busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell;
};
+ lix-clang-tidy = final.callPackage ./subprojects/lix-clang-tidy { };
+
# Export the patched version of boehmgc that Lix uses into the overlay
# for consumers of this flake.
boehmgc-nix = final.nix.passthru.boehmgc-nix;
@@ -290,6 +292,24 @@
werror = true;
};
+ # Although this might be nicer to do with pre-commit, that would
+ # require adding 12MB of nodejs to the dev shell, whereas building it
+ # in CI with Nix avoids that at a cost of slower feedback on rarely
+ # touched files.
+ jsSyntaxCheck =
+ let
+ nixpkgs = nixpkgsFor.x86_64-linux.native;
+ inherit (nixpkgs) pkgs;
+ docSources = lib.fileset.toSource {
+ root = ./doc;
+ fileset = lib.fileset.fileFilter (f: f.hasExt "js") ./doc;
+ };
+ in
+ pkgs.runCommand "js-syntax-check" { } ''
+ find ${docSources} -type f -print -exec ${pkgs.nodejs-slim}/bin/node --check '{}' ';'
+ touch $out
+ '';
+
# Make sure that nix-env still produces the exact same result
# on a particular version of Nixpkgs.
evalNixpkgs =
@@ -384,6 +404,8 @@
rec {
inherit (nixpkgsFor.${system}.native) nix;
default = nix;
+
+ inherit (nixpkgsFor.${system}.native) lix-clang-tidy;
}
// (
lib.optionalAttrs (builtins.elem system linux64BitSystems) {