Closed 44100hertz closed 6 months ago
UPDATE: I did get it to work. Here is my 4.8.1 flake with pnpm. No fork needed.
{
inputs.pkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.prisma-utils.url = "github:VanCoding/nix-prisma-utils";
outputs =
{ pkgs, prisma-utils, ... }:
let
nixpkgs = import pkgs { system = "x86_64-linux"; };
lib = nixpkgs.lib;
prisma =
(prisma-utils.lib.prisma-factory {
inherit nixpkgs;
query-engine-hash = "sha256-nffpy13K7Z+ZLUjkdLyLIN1+mIaDpFJ7yglal4rWO9o=";
libquery-engine-hash = "sha256-o/16nzI8emeM1EvCdqtL53CJ7yEyJjWusKovGXMllo4=";
migration-engine-hash = "sha256-u3jxty/tUI5/QrR8DJKionMtlpccs7XTBb0Hqqg7gi0=";
introspection-engine-hash = "sha256-IODNrQ4J0pyJiOjIegI/yqgSZjPCF9Uffca1GziHK28=";
prisma-fmt-hash = "sha256-v0EWddy7VVuxCK9BB8LqnBhIcZet+kVhuvzlKIS+qfs=";
}).fromPnpmLock
./pnpm-lock.yaml; # <--- path to our pnpm-lock.yaml file that contains the version of prisma-engines
in
{
devShells.x86_64-linux.default = nixpkgs.mkShell { shellHook = prisma.shellHook; };
};
}
A little extra documentation would help a lot here.
When trying to build Prisma 4.8.1 (the selected version for electric-sql), I get this error:
According to the source file from 4.8.0 (engine is exactly the same between 4.8.0 and 4.8.1), the available binaries are different.
In other words, there is no schema engine in 4.8.1. I'm trying to get this work on my machine, so I may just make a fork of this for Prisma 4.8.1. But ideally, someone should do the research about which binaries correspond with which versions and make this package function accordingly.