-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
29 lines (23 loc) · 1.05 KB
/
shell.nix
File metadata and controls
29 lines (23 loc) · 1.05 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
{ pkgs ? import <nixpkgs> {} }:
let
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {};
# Use prisma-engines from unstable which is at least version 7.x
prisma-engines = if unstable ? prisma-engines_7 then unstable.prisma-engines_7 else unstable.prisma-engines;
in
pkgs.mkShell {
buildInputs = with pkgs; [
prisma-engines
openssl
zlib
nodePackages.pnpm
];
shellHook = ''
export PRISMA_SCHEMA_ENGINE_BINARY="${prisma-engines}/bin/schema-engine"
export PRISMA_QUERY_ENGINE_BINARY="${prisma-engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${prisma-engines}/lib/libquery_engine.node"
export PRISMA_FMT_BINARY="${prisma-engines}/bin/prisma-fmt"
# Some Prisma operations need these in the library path
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [ pkgs.openssl pkgs.stdenv.cc.cc.lib pkgs.zlib ]}:$LD_LIBRARY_PATH"
echo "Prisma environment initialized with engines from nixos-unstable (${prisma-engines.version})"
'';
}