Skip to content

Commit

Permalink
chore: add NixOS development flake (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotcorreia authored Apr 1, 2023
1 parent 8fbfa18 commit 06f4ea3
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
42 changes: 42 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ nodejs-18_x yarn nodePackages.prisma ];
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"
'';
};
});
}

0 comments on commit 06f4ea3

Please sign in to comment.