File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Run `nix develop` to get a shell with the prisma CLI
2
+ # reference: https://github.com/VanCoding/nix-prisma-utils
3
+
4
+ {
5
+ inputs = {
6
+ nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
7
+ prisma-utils . url = "github:VanCoding/nix-prisma-utils" ;
8
+ } ;
9
+
10
+ outputs =
11
+ { nixpkgs , prisma-utils , ... } :
12
+ let
13
+ system = "x86_64-linux" ;
14
+ pkgs = nixpkgs . legacyPackages . ${ system } ;
15
+ prisma =
16
+ ( prisma-utils . lib . prisma-factory {
17
+ inherit pkgs ;
18
+ # just copy these hashes for now, and then change them when nix complains about the mismatch
19
+ prisma-fmt-hash = "sha256-atD5GZfmeU86mF1V6flAshxg4fFR2ews7EwaJWZZzbc=" ;
20
+ query-engine-hash = "sha256-8FTZaKmQCf9lrDQvkF5yWPeZ7TSVfFjTbjdbWWEHgq4=" ;
21
+ libquery-engine-hash = "sha256-USIdaum87ekGY6F6DaL/tKH0BAZvHBDK7zjmCLo//kM=" ;
22
+ schema-engine-hash = "sha256-k5MkxXViEqojbkkcW/4iBFNdfhb9PlMEF1M2dyhfOok=" ;
23
+ } ) . fromNpmLock
24
+ ./package-lock.json ; # <--- path to our package-lock.json file that contains the version of prisma-engines
25
+ in
26
+ {
27
+ devShells . ${ system } . default = pkgs . mkShell {
28
+ env = prisma . env ;
29
+ # or, you can use `shellHook` instead of `env` to load the same environment variables.
30
+ # shellHook = prisma.shellHook;
31
+ } ;
32
+ } ;
33
+ }
34
+
You can’t perform that action at this time.
0 commit comments