29 lines
1.1 KiB
Nix
29 lines
1.1 KiB
Nix
{
|
|
description = "A prisma test project";
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
devShell = pkgs.mkShell {
|
|
nativeBuildInputs = [ pkgs.bashInteractive ];
|
|
buildInputs = with pkgs; [
|
|
nodePackages.prisma
|
|
nodePackages."@nestjs/cli"
|
|
nodePackages.npm
|
|
nodejs-slim
|
|
];
|
|
shellHook = with pkgs; ''
|
|
export PRISMA_MIGRATION_ENGINE_BINARY="${prisma-engines}/bin/migration-engine"
|
|
export PRISMA_QUERY_ENGINE_BINARY="${prisma-engines}/bin/query-engine"
|
|
export PRISMA_QUERY_ENGINE_LIBRARY="${prisma-engines}/lib/libquery_engine.node"
|
|
export PRISMA_INTROSPECTION_ENGINE_BINARY="${prisma-engines}/bin/introspection-engine"
|
|
export PRISMA_FMT_BINARY="${prisma-engines}/bin/prisma-fmt"
|
|
export DATABASE_URL=postgresql://user:eip@localhost:5432/chromacase
|
|
'';
|
|
};
|
|
});
|
|
}
|