Skip to content

Commit c9be1e1

Browse files
committed
doc: add fromBunLock to docs
1 parent 6d1b294 commit c9be1e1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

readme.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,34 @@ With nix-prisma-utils it's the other way around. You can simply install prisma t
7676
7777
```
7878

79+
### Using `bun`
80+
81+
```nix
82+
{
83+
inputs.pkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
84+
inputs.prisma-utils.url = "github:VanCoding/nix-prisma-utils";
85+
86+
outputs =
87+
{ pkgs, prisma-utils, ... }:
88+
let
89+
nixpkgs = import pkgs { system = "x86_64-linux"; };
90+
prisma =
91+
(prisma-utils.lib.prisma-factory {
92+
inherit nixpkgs;
93+
prisma-fmt-hash = "sha256-4zsJv0PW8FkGfiiv/9g0y5xWNjmRWD8Q2l2blSSBY3s="; # just copy these hashes for now, and then change them when nix complains about the mismatch
94+
query-engine-hash = "sha256-6ILWB6ZmK4ac6SgAtqCkZKHbQANmcqpWO92U8CfkFzw=";
95+
libquery-engine-hash = "sha256-n9IimBruqpDJStlEbCJ8nsk8L9dDW95ug+gz9DHS1Lc=";
96+
schema-engine-hash = "sha256-j38xSXOBwAjIdIpbSTkFJijby6OGWCoAx+xZyms/34Q=";
97+
}).fromBunLock
98+
./bun.lock; # <--- path to our bun.lock file that contains the version of prisma-engines.
99+
# NOTE: does not work with bun.lockb!
100+
in
101+
{
102+
devShells.x86_64-linux.default = nixpkgs.mkShell { shellHook = prisma.shellHook; };
103+
};
104+
}
105+
```
106+
79107
## Testing
80108

81109
`nix run .#test-all`

0 commit comments

Comments
 (0)