-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.nix
More file actions
30 lines (30 loc) · 916 Bytes
/
lib.nix
File metadata and controls
30 lines (30 loc) · 916 Bytes
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
{ pkgs, ... }: {
mkPrismaShell =
{ shellHookPre ? ""
, shellHookPost ? ""
, buildInputs ? [ ]
, prismaPackage ? pkgs.nodePackages.prisma
, prismaEnginesPackage ? pkgs.prisma-engines
, ...
} @ attrs:
pkgs.mkShell (attrs // {
buildInputs = with pkgs;
[
prismaPackage
]
++ buildInputs;
shellHook =
let
engines = prismaEnginesPackage;
in
shellHookPre
+ ''
export PRISMA_MIGRATION_ENGINE_BINARY="${engines}/bin/migration-engine"
export PRISMA_QUERY_ENGINE_BINARY="${engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${engines}/lib/libquery_engine.node"
export PRISMA_INTROSPECTION_ENGINE_BINARY="${engines}/bin/introspection-engine"
export PRISMA_FMT_BINARY="${engines}/bin/prisma-fmt"
''
+ shellHookPost;
});
}