prisma-engines: add setup hook for configuring environment variables

The primary use case of this package is to use it in a devShell to allow
Prisma to work on NixOS. This setup hook simplifies this, by setting the
environment variables automatically.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2025-06-15 12:40:52 +02:00
parent 7383433fce
commit 74ab7622e7
2 changed files with 6 additions and 0 deletions
@@ -63,6 +63,8 @@ rustPlatform.buildRustPackage rec {
# Tests are long to compile
doCheck = false;
setupHook = ./setup-hook.sh;
meta = with lib; {
description = "Collection of engines that power the core stack for Prisma";
homepage = "https://www.prisma.io/";
@@ -0,0 +1,4 @@
export PRISMA_SCHEMA_ENGINE_BINARY="@out@/bin/schema-engine"
export PRISMA_QUERY_ENGINE_BINARY="@out@/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="@out@/lib/libquery_engine.node"
export PRISMA_FMT_BINARY="@out@/bin/prisma-fmt"