80 lines
1.9 KiB
Nix
80 lines
1.9 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 = "php80";
|
|
withExtensions = [
|
|
"mysqnd"
|
|
"dom"
|
|
"curl"
|
|
"gettext"
|
|
"intl"
|
|
"mysqli"
|
|
"posix"
|
|
"openssl"
|
|
"xdebug"
|
|
"pdo"
|
|
"bcmath"
|
|
"gd"
|
|
"imagick"
|
|
"iconv"
|
|
"mbstring"
|
|
"pdo_mysql"
|
|
"pdo_sqlite"
|
|
"soap"
|
|
"sodium"
|
|
"tidy"
|
|
"tokenizer"
|
|
"xmlreader"
|
|
"xmlwriter"
|
|
"xsl"
|
|
"zip"
|
|
"rdkafka"
|
|
"mailparse"
|
|
];
|
|
# 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
|
|
];
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|