-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
40 lines (37 loc) · 1.17 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
37
38
39
40
{
description = "Supabase SDK for Elixir";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
outputs = {nixpkgs, ...}: let
inherit (nixpkgs.lib) genAttrs;
inherit (nixpkgs.lib.systems) flakeExposed;
forAllSystems = f:
genAttrs flakeExposed (system: f (import nixpkgs {inherit system;}));
in {
devShells = forAllSystems (pkgs: let
inherit (pkgs) mkShell;
inherit (pkgs.beam.interpreters) erlang_27;
inherit (pkgs.beam) packagesWith;
beam = packagesWith erlang_27;
elixir_1_18 = beam.elixir.override {
version = "1.18.1";
src = pkgs.fetchFromGitHub {
owner = "elixir-lang";
repo = "elixir";
rev = "v1.18.1";
sha256 = "sha256-zJNAoyqSj/KdJ1Cqau90QCJihjwHA+HO7nnD1Ugd768=";
};
};
in {
default = mkShell {
name = "postgrest-ex";
packages = with pkgs;
[elixir_1_18 postgresql]
++ lib.optional stdenv.isLinux [inotify-tools]
++ lib.optional stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.CoreFoundation
];
};
});
};
}