Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (45 loc) · 1.9 KB
/
Copy pathflake.nix
File metadata and controls
48 lines (45 loc) · 1.9 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
{
description = "are-the-types-wrong toolchain — the formatter and runtimes the check chain shells out to";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
comment-checker = {
url = "github:systemfsoftware/comment-checker";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hashless pnpm store: each lockfile integrity is the fetch hash.
# fetchPnpmDeps needs a second store-wide hash that Dependabot cannot update.
importPnpmLock = {
url = "github:Scrumplex/importPnpmLock.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, comment-checker, importPnpmLock }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forEachSystem = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
in
{
packages = forEachSystem (pkgs:
let
pkgs' = pkgs.extend importPnpmLock.overlays.default;
dprint = pkgs.callPackage ./nix/dprint.nix { };
cc = comment-checker.packages.${pkgs.system}.comment-checker;
comment-checker-bwrap = pkgs.callPackage ./nix/comment-checker-bwrap.nix { comment-checker = cc; };
attw = pkgs'.callPackage ./nix/attw.nix { };
in { inherit dprint attw comment-checker-bwrap; comment-checker = cc; default = dprint; });
# pnpm is deliberately absent: `packageManager` pins pnpm@11.21.0 and
# corepack is the one thing allowed to resolve it. A second pnpm on PATH
# would answer `pnpm install` with a version the lockfile never saw.
devShells = forEachSystem (pkgs: {
default = pkgs.mkShell {
packages = [
self.packages.${pkgs.stdenv.hostPlatform.system}.dprint
self.packages.${pkgs.stdenv.hostPlatform.system}.comment-checker-bwrap
pkgs.nodejs_24
pkgs.deno
pkgs.process-compose
];
};
});
};
}