nodesPackages.prisma: #135934 follow-up corrections
This commit is contained in:
parent
d047d336d6
commit
47557e2984
2 changed files with 10 additions and 7 deletions
|
@ -282,11 +282,11 @@ let
|
|||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postInstall = with pkgs; ''
|
||||
wrapProgram "$out/bin/prisma" \
|
||||
--prefix PRISMA_MIGRATION_ENGINE_BINARY : "${prisma-engines}/bin/migration-engine" \
|
||||
--prefix PRISMA_QUERY_ENGINE_BINARY : "${prisma-engines}/bin/query-engine" \
|
||||
--prefix PRISMA_QUERY_ENGINE_LIBRARY : "${lib.getLib prisma-engines}/libquery_engine.so.node"
|
||||
--prefix PRISMA_INTROSPECTION_ENGINE_BINARY : "${prisma-engines}/bin/introspection-engine" \
|
||||
--prefix PRISMA_FMT_BINARY : "${prisma-engines}/bin/prisma-fmt"
|
||||
--set PRISMA_MIGRATION_ENGINE_BINARY ${prisma-engines}/bin/migration-engine \
|
||||
--set PRISMA_QUERY_ENGINE_BINARY ${prisma-engines}/bin/query-engine \
|
||||
--set PRISMA_QUERY_ENGINE_LIBRARY ${lib.getLib prisma-engines}/lib/libquery_engine.node \
|
||||
--set PRISMA_INTROSPECTION_ENGINE_BINARY ${prisma-engines}/bin/introspection-engine \
|
||||
--set PRISMA_FMT_BINARY ${prisma-engines}/bin/prisma-fmt
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -4,9 +4,12 @@
|
|||
, pkg-config
|
||||
, protobuf
|
||||
, rustPlatform
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
let
|
||||
node-api-lib = (if stdenv.isDarwin then "libquery_engine.dylib" else "libquery_engine.so");
|
||||
in rustPlatform.buildRustPackage rec {
|
||||
pname = "prisma-engines";
|
||||
version = "2.30.2";
|
||||
|
||||
|
@ -43,7 +46,7 @@ rustPlatform.buildRustPackage rec {
|
|||
'';
|
||||
|
||||
postInstall = ''
|
||||
cp target/x86_64-unknown-linux-gnu/release/libquery_engine.so $out/lib/libquery_engine.so.node
|
||||
mv $out/lib/${node-api-lib} $out/lib/libquery_engine.node
|
||||
'';
|
||||
|
||||
# Tests are long to compile
|
||||
|
|
Loading…
Reference in a new issue