1
0
Fork 0
chezmoi/dot_config/php/72/flake.nix
2023-03-03 16:19:20 +01:00

53 lines
1.3 KiB
Nix

{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-shell.url = "github:loophp/nix-shell";
};
outputs = { self, nixpkgs, flake-utils, nix-shell }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
};
php = (nix-shell.api.makePhp system {
php = "php72";
withExtensions = [ "xdebug" ];
# withoutExtensions = [ "sodium" ];
extraConfig = ''
memory_limit=-1
max_execution_time=0
max_input_time=-1
xdebug.mode=debug
xdebug.output_dir=/tmp
xdebug.start_with_request=trigger
xdebug.client_host=127.0.0.1
xdebug.client_port=9000
'';
flags = {
apxs2Support = false;
ztsSupport = false;
};
});
in
{
defaultPackage = php;
devShells = {
default = pkgs.mkShellNoCC {
name = "PHP project";
buildInputs = [
php
php.packages.composer
pkgs.mailhog
];
};
};
}
);
}