-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.dev.nix
More file actions
34 lines (31 loc) · 831 Bytes
/
shell.dev.nix
File metadata and controls
34 lines (31 loc) · 831 Bytes
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
{
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/heads/master.tar.gz") {},
}:
let
php_custom = pkgs.php82.buildEnv {
extensions = { all, enabled }: with all; enabled ++ [ xdebug xsl ];
extraConfig = ''
memory_limit=-1
xdebug.mode=debug
'';
};
PROJECT_ROOT = builtins.getEnv "PWD";
rooter = pkgs.writeShellScriptBin "rooter" ''
${php_custom}/bin/php ${PROJECT_ROOT}/rooter.php "$@"
'';
in
pkgs.mkShell {
buildInputs = with pkgs; [
traefik
dnsmasq
pv
gzip
php_custom
php_custom.packages.composer
rooter
];
shellHook = ''
ln -sf ${rooter}/bin/rooter ./rooter
${rooter}/bin/rooter init
'';
}