Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
50 lines (46 loc) · 1.88 KB
/
Copy pathflake.nix
File metadata and controls
50 lines (46 loc) · 1.88 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
{
description = "omp-claude-compat toolchain — the formatter and runtimes the check chain shells out to";
nixConfig = {
extra-substituters = "https://nix.systemfsoftware.com";
extra-trusted-public-keys = "nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=";
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
comment-checker = {
url = "github:systemfsoftware/comment-checker";
inputs.nixpkgs.follows = "nixpkgs";
};
dprint.url = "github:systemfsoftware/dprint";
};
outputs = { self, nixpkgs, comment-checker, dprint }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forEachSystem = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
in
{
packages = forEachSystem (pkgs:
let
cc = comment-checker.packages.${pkgs.system}.comment-checker;
comment-checker-bwrap = pkgs.callPackage ./nix/comment-checker-bwrap.nix { comment-checker = cc; };
in { inherit comment-checker-bwrap; comment-checker = cc; });
# pnpm is not a nixpkgs package: `packageManager` pins pnpm@11.21.0 and
# corepack resolves exactly that version. The shim gives the release
# plan a `pnpm` on PATH (`nix develop --command` runs this hook), and a
# second, unpinned pnpm is never on PATH.
devShells = forEachSystem (pkgs: {
default = pkgs.mkShell {
packages = [
dprint.packages.${pkgs.stdenv.hostPlatform.system}.default
self.packages.${pkgs.stdenv.hostPlatform.system}.comment-checker-bwrap
pkgs.nodejs_24
pkgs.deno
];
shellHook = ''
mkdir -p "$HOME/.cache/corepack-shims"
corepack enable pnpm --install-directory "$HOME/.cache/corepack-shims"
export PATH="$HOME/.cache/corepack-shims:$PATH"
'';
};
});
};
}