-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (50 loc) · 1.45 KB
/
flake.nix
File metadata and controls
55 lines (50 loc) · 1.45 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "ifidie.run development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
# Import tempo-foundry-bin from local nix/tempo.nix
tempo-foundry-bin = pkgs.callPackage ./nix/tempo.nix { };
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
tempo-foundry-bin # Provides: forge, cast, anvil, chisel
solc
nodejs
pnpm
postgresql
];
shellHook = ''
echo "🚀 ifidie.run dev environment"
echo "Tempo Foundry binaries available:"
echo " - forge"
echo " - cast"
echo " - anvil"
echo " - chisel"
echo ""
echo "PostgreSQL available"
echo ""
echo "Run 'mprocs' to start all services (postgres, anvil, dev server)"
# Create postgres data directory if it doesn't exist
export PGDATA="$PWD/.postgres"
if [ ! -d "$PGDATA" ]; then
echo "Initializing PostgreSQL database..."
initdb --no-locale --encoding=UTF8 -U postgres
fi
'';
};
}
);
}