Prisma cli in nixos

i have been trying to use the new @prisma/cli node package in nixos but i couldn’t get it to work

the problem is that the core engine of the cli is built-in rust and when I install the cli it downloads the appropriate engine binaries based on the detected platform but when it couldn’t detect the platform it downloads the binaries compatible with the Debian platform which doesn’t work in nixos

i think it could be solved if i installed the packages that the debian binary depend on but i tried and couldn’t get it to work

this is the error when i try to use the cli

Error: Get config Error: Command failed with ENOENT: [project folder]/node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x cli get-config
spawn [project folder]/node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x ENOENT

any help is appreciated

just writing this for others facing the same problem

I have managed to get the Prisma CLI working by compiling the rust binaries from source and copying them to the package folder in node_modules

I have also packaged the CLI as nix package for anyone else wanting to use Prisma in NixOS
at https://gitlab.com/husseinraoouf/nur-repository you can use it by directly importing my git repo or wait till it is in NUR Repos smiley

thank you