File tree Expand file tree Collapse file tree 2 files changed +117
-0
lines changed Expand file tree Collapse file tree 2 files changed +117
-0
lines changed Original file line number Diff line number Diff line change 1+ # this is a WIP flake for development and experimentation only
2+ {
3+ description = "phpactor/phpactor" ;
4+
5+ inputs = {
6+ nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
7+ } ;
8+
9+ outputs = inputs @ {
10+ self ,
11+ flake-parts ,
12+ ...
13+ } :
14+ flake-parts . lib . mkFlake { inherit inputs ; } {
15+ # This flake is for Linux (x86) and Apple (darwin) systems
16+ # If you need more systems, inspect `nixpkgs.lib.systems.flakeExposed` and
17+ # add them to this list.
18+ #
19+ # $ nix repl "<nixpkgs>"
20+ # nix-repl> lib.systems.flakeExposed
21+ systems = [ "x86_64-linux" "aarch64-linux" ] ;
22+
23+ perSystem = {
24+ pkgs ,
25+ system ,
26+ ...
27+ } : let
28+ phpWithXdebug = ( pkgs . php84 . buildEnv {
29+ extensions = ( { enabled , all } : enabled ++ ( with all ; [
30+ xdebug
31+ ] ) ) ;
32+ extraConfig = ''
33+ xdebug.mode=debug
34+ '' ;
35+ } ) ;
36+ in {
37+ # Run `nix fmt` to reformat the nix files
38+ formatter = pkgs . alejandra ;
39+
40+ # Run `nix develop` to enter the development shell
41+ devShells . default = pkgs . mkShellNoCC {
42+ name = "php-devshell" ;
43+
44+ buildInputs = [
45+ phpWithXdebug
46+ pkgs . php84 . packages . composer
47+ ] ;
48+ shellHook = ''
49+ if [ ! -d ".venv" ]; then
50+ python3 -m venv .venv;
51+ fi
52+ source .venv/bin/activate;'' ;
53+ } ;
54+ } ;
55+ } ;
56+ }
57+
You can’t perform that action at this time.
0 commit comments