From 3a33b00fd8d806c3384b10fac8c2c407e47b79d0 Mon Sep 17 00:00:00 2001 From: Julius de Bruijn Date: Wed, 27 Apr 2022 10:51:30 +0200 Subject: [PATCH] prisma-engines: 3.12.0 -> 3.13.0 --- .../tools/database/prisma-engines/default.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/database/prisma-engines/default.nix b/pkgs/development/tools/database/prisma-engines/default.nix index 73af1bde5ea2..b3c5c1b0dd09 100644 --- a/pkgs/development/tools/database/prisma-engines/default.nix +++ b/pkgs/development/tools/database/prisma-engines/default.nix @@ -13,19 +13,19 @@ # function correctly. rustPlatform.buildRustPackage rec { pname = "prisma-engines"; - version = "3.12.0"; + version = "3.13.0"; src = fetchFromGitHub { owner = "prisma"; repo = "prisma-engines"; rev = version; - sha256 = "sha256-lIHE63XIPutvTS2cid0+tuo+JMSKMGuSUcnFv1mCRrM="; + sha256 = "sha256-+Ug4tOaqUaqcEoMv20CKE8JrjIdW34VSn20gXZYX92k="; }; # Use system openssl. OPENSSL_NO_VENDOR = 1; - cargoSha256 = "sha256-SkI+GLHknC+CGhGo7KiZahBxMp/JCIukTe2C0mMTdjY="; + cargoSha256 = "sha256-V2G++BYLRGVM4leB2jkM+HcFiCIdf2wA3dfYdtlq7XI="; nativeBuildInputs = [ pkg-config ]; @@ -62,3 +62,15 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ pamplemousse pimeys superherointj ]; }; } + +### Troubleshooting +# Here's an example application using Prisma with Nix: https://github.com/pimeys/nix-prisma-example +# At example's `flake.nix` shellHook, notice the requirement of defining environment variables for prisma, it's values will show on `prisma --version`. +# Read the example's README: https://github.com/pimeys/nix-prisma-example/blob/main/README.md +# Prisma requires 2 packages, `prisma-engines` and `nodePackages.prisma`, to be at *exact* same versions. +# Certify at `package.json` that dependencies "@prisma/client" and "prisma" are equal, meaning no caret (`^`) in version. +# Configure NPM to use exact version: `npm config set save-exact=true` +# Delete `package-lock.json`, delete `node_modules` directory and run `npm install`. +# Run prisma client from `node_modules/.bin/prisma`. +# Run `./node_modules/.bin/prisma --version` and check if both prisma packages versions are equal, current platform is `linux-nixos`, and other keys equal to the prisma environment variables you defined for prisma. +# Test prisma with `generate`, `db push`, etc. It should work. If not, open an issue.