-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
72 lines (70 loc) · 2.09 KB
/
Copy pathflake.nix
File metadata and controls
72 lines (70 loc) · 2.09 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
description = "nativelink-action";
inputs = {
# This flake follows the packages from the open-source nativelink
# repository to keep local packages in sync. When making changes, manually
# verify the flake.lock file to ensure that we don't introduce duplicate
# versions.
nativelink.url = "github:TraceMachina/nativelink";
nixpkgs.follows = "nativelink/nixpkgs";
flake-parts.follows = "nativelink/flake-parts";
git-hooks.follows = "nativelink/git-hooks";
flake-root.url = "github:srid/flake-root";
};
outputs = inputs @ {
self,
flake-parts,
flake-root,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [inputs.git-hooks.flakeModule inputs.flake-root.flakeModule];
perSystem = {
config,
pkgs,
system,
...
}: {
_module.args.pkgs = import self.inputs.nixpkgs {
inherit system;
overlays = [
];
};
pre-commit.settings = {
hooks = import ./tools/pre-commit-hooks.nix {
inherit pkgs;
flake-root = config.flake-root.package;
pnpm = pkgs.pnpm.override {
nodejs = pkgs.nodejs_24;
};
};
};
devShells.default = pkgs.mkShell {
buildInputs = [pkgs.bashInteractive]; # See https://discourse.nixos.org/t/non-interactive-bash-errors-from-flake-nix-mkshell/33310/4
nativeBuildInputs = let
pnpm = pkgs.pnpm.override {
nodejs = pkgs.nodejs_24;
};
in [
# Development tooling.
pkgs.git
pkgs.pre-commit
pkgs.nodejs_24
pnpm
pkgs.actionlint
];
shellHook = ''
export SHELL=${pkgs.bashInteractive}/bin/bash
# Generate the .pre-commit-config.yaml symlink when entering the
# development shell.
${config.pre-commit.installationScript}
'';
};
};
};
}