-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
36 lines (31 loc) · 1.2 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; };
outputs = { self, nixpkgs }:
let
inherit (nixpkgs.lib) genAttrs;
forAllSystems =
genAttrs [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
forAllPkgs = function: forAllSystems (system: function pkgs.${system});
pkgs = forAllSystems (system:
(import nixpkgs {
inherit system;
overlays = [ ];
}));
in {
formatter = forAllPkgs (pkgs: pkgs.nixpkgs-fmt);
devShells = forAllPkgs (pkgs:
with pkgs.lib; {
default = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [ bun nodejs_23 ];
buildInputs = with pkgs; [ prisma prisma-engines ];
shellHook = with pkgs; ''
export PRISMA_SCHEMA_ENGINE_BINARY="${prisma-engines}/bin/schema-engine"
export PRISMA_QUERY_ENGINE_BINARY="${prisma-engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${prisma-engines}/lib/libquery_engine.node"
export PRISMA_FMT_BINARY="${prisma-engines}/bin/prisma-fmt"
'';
LD_LIBRARY_PATH = makeLibraryPath buildInputs;
};
});
};
}