Skip to content

Commit 92baf34

Browse files
committed
correctness: invert names of nixpkgs <-> pkgs
1 parent 015a6e7 commit 92baf34

File tree

5 files changed

+400
-377
lines changed

5 files changed

+400
-377
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
inputs.pkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
3-
inputs.flake-utils.url = "github:numtide/flake-utils";
4-
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
5-
inputs.treefmt-nix.inputs.nixpkgs.follows = "pkgs";
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
treefmt-nix.url = "github:numtide/treefmt-nix";
6+
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
7+
};
68
outputs =
79
{
810
self,
9-
pkgs,
11+
nixpkgs,
1012
flake-utils,
1113
treefmt-nix,
1214
}:
@@ -16,31 +18,32 @@
1618
flake-utils.lib.eachDefaultSystem (
1719
system:
1820
let
19-
nixpkgs = import pkgs { inherit system; };
20-
yarn-v1 = nixpkgs.writeShellApplication {
21+
pkgs = nixpkgs.legacyPackages.${system};
22+
23+
yarn-v1 = pkgs.writeShellApplication {
2124
name = "yarn-v1";
2225
checkPhase = "";
23-
runtimeInputs = [ nixpkgs.yarn ];
26+
runtimeInputs = [ pkgs.yarn ];
2427
text = "yarn $@";
2528
};
26-
yarn-berry = nixpkgs.writeShellApplication {
29+
yarn-berry = pkgs.writeShellApplication {
2730
name = "yarn-berry";
2831
checkPhase = "";
29-
runtimeInputs = [ nixpkgs.yarn-berry ];
32+
runtimeInputs = [ pkgs.yarn-berry ];
3033
text = "yarn $@";
3134
};
32-
treefmt = treefmt-nix.lib.evalModule nixpkgs {
35+
treefmt = treefmt-nix.lib.evalModule pkgs {
3336
# nixfmt is nixfmt-rfc-style
3437
programs.nixfmt.enable = true;
3538
};
3639
in
3740
{
3841
formatter = treefmt.config.build.wrapper;
3942
checks =
40-
(nixpkgs.callPackages ./tests.nix {
43+
(pkgs.callPackages ./tests.nix {
4144
inherit
45+
pkgs
4246
prisma-factory
43-
nixpkgs
4447
yarn-v1
4548
yarn-berry
4649
;
@@ -52,7 +55,7 @@
5255
let
5356
prisma = (
5457
(prisma-factory {
55-
inherit nixpkgs;
58+
inherit pkgs;
5659
prisma-fmt-hash = "sha256-4zsJv0PW8FkGfiiv/9g0y5xWNjmRWD8Q2l2blSSBY3s=";
5760
query-engine-hash = "sha256-6ILWB6ZmK4ac6SgAtqCkZKHbQANmcqpWO92U8CfkFzw=";
5861
libquery-engine-hash = "sha256-n9IimBruqpDJStlEbCJ8nsk8L9dDW95ug+gz9DHS1Lc=";
@@ -61,14 +64,14 @@
6164
"6a3747c37ff169c90047725a05a6ef02e32ac97e"
6265
);
6366
in
64-
nixpkgs.mkShell {
67+
pkgs.mkShell {
6568
buildInputs = [
66-
nixpkgs.nodejs-18_x
67-
nixpkgs.pnpm
68-
nixpkgs.bun
69-
nixpkgs.stdenv.cc.cc.lib
69+
pkgs.nodejs-18_x
70+
pkgs.pnpm
71+
pkgs.bun
72+
pkgs.stdenv.cc.cc.lib
7073
prisma.package
71-
nixpkgs.nixfmt-rfc-style
74+
pkgs.nixfmt-rfc-style
7275
yarn-v1
7376
yarn-berry
7477
];

0 commit comments

Comments
 (0)