-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
77 lines (75 loc) · 2.25 KB
/
shell.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
# Pinning packages with URLs inside a Nix expression
# https://nix.dev/tutorials/first-steps/towards-reproducibility-pinning-nixpkgs#pinning-packages-with-urls-inside-a-nix-expression
# Picking the commit can be done via https://status.nixos.org,
# which lists all the releases and the latest commit that has passed all tests.
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/854f4671883250e456dc1553c783ac9741a0e9a4.tar.gz") {},
php ? pkgs.php83.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
openssl
pcntl
pdo_mysql
mbstring
intl
curl
bcmath
apcu
xdebug
]));
extraConfig = ''
xdebug.mode=develop,debug
memory_limit=256M
'';
},
}:
pkgs.mkShell {
buildInputs = [
pkgs.vim
pkgs.which
pkgs.coreutils
pkgs.overmind
php
pkgs.php83Packages.composer
pkgs.git
pkgs.openssh
pkgs.jq
pkgs.roadrunner
pkgs.gh
pkgs.gnupg
pkgs.httpie
pkgs.just
pkgs.symfony-cli
pkgs.nodePackages.pnpm
pkgs.stripe-cli
pkgs.tailwindcss
pkgs.process-compose
pkgs.mysql80
pkgs.hostname
pkgs.redis
pkgs.envsubst
];
shellHook = ''
export MYSQL_HOME=''${PWD}/storage/mysql
export MYSQL_DATADIR=''${PWD}/storage/mysql/data
export MYSQL_UNIX_PORT=''${PWD}/.mysql.sock
export MYSQLX_UNIX_PORT=''${PWD}/.mysqlx.sock
export REDIS_DATADIR=''${PWD}/storage/redis/data
export REDIS_PID=''${PWD}/.redis.pid
export REDIS_SOCKET=''${PWD}/.redis.sock
export STRIPE_PROJECT_NAME=subscribe
export STRIPE_DEVICE_NAME=developer-''${DEVELOPER_NAME:-default}
# TODO: move secret to a vault
export STRIPE_API_KEY=sk_test_51IHFU3H5sb6o9949VJorc2HKKiXJ8Q5gh4cSKrRrvHmu2FRVoIYoHxygkUEji2WgKFgVpmYxHnV7WDjRLm3sUyIx00HIEjLSeh
source .env
redis-server -v
mysql --version
git --version
php -v
composer --version
symfony -V
rr -v
echo "pnpm version: " && pnpm -v
git status
'';
}