Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move PHP common stuff to a shared function #1

Merged
merged 1 commit into from
Jun 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions resources/dev/common.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ pkgs, phpPkg }:
with pkgs;
let
php = phpPkg;

options = ''
max_execution_time = 0
xdebug.mode=debug
memory_limit=-1
'';

phpOverride = php.buildEnv {
extensions = { all, ... }: with all; [
# Mandatory
filter
iconv
ctype
redis
tokenizer
simplexml

# Recommendations
dom
posix
intl
opcache

# Optional
pcov
pdo_sqlite
pdo_mysql
pdo_pgsql

openssl
calendar
soap
mbstring
exif
fileinfo
gd
curl
zip
xmlwriter
xdebug
];
extraConfig = options;
};

in mkShell {
name = "php74-dev";

buildInputs = [
# Install PHP and composer
phpOverride
phpOverride.packages.composer

# Install Github CLi
gh

# Install Symfony CLi
symfony-cli

# Install GNU Make for shorthands
gnumake
];
}
66 changes: 1 addition & 65 deletions resources/dev/php74/default.nix
Original file line number Diff line number Diff line change
@@ -1,66 +1,2 @@
{ pkgs ? (import <nixpkgs> {}), ... }:
with pkgs;
let
php = php74;

options = ''
max_execution_time = 0
xdebug.mode=debug
memory_limit=-1
'';

phpOverride = php.buildEnv {
extensions = { all, ... }: with all; [
# Mandatory
filter
iconv
ctype
redis
tokenizer
simplexml

# Recommendations
dom
posix
intl
opcache

# Optional
pcov
pdo_sqlite
pdo_mysql
pdo_pgsql

openssl
calendar
soap
mbstring
exif
fileinfo
gd
curl
zip
xmlwriter
xdebug
];
extraConfig = options;
};

in mkShell {
name = "php74-dev";

buildInputs = [
# Install PHP and composer
phpOverride
phpOverride.packages.composer

# Install Github CLi
gh

# Install Symfony CLi
symfony-cli

# Install GNU Make for shorthands
gnumake
];
}
(import ../common.nix) { inherit pkgs; phpPkg = pkgs.php74;}
66 changes: 1 addition & 65 deletions resources/dev/php80/default.nix
Original file line number Diff line number Diff line change
@@ -1,66 +1,2 @@
{ pkgs ? (import <nixpkgs> {}), ... }:
with pkgs;
let
php = php80;

options = ''
max_execution_time = 0
xdebug.mode=debug
memory_limit=-1
'';

phpOverride = php.buildEnv {
extensions = { all, ... }: with all; [
# Mandatory
filter
iconv
ctype
redis
tokenizer
simplexml

# Recommendations
dom
posix
intl
opcache

# Optional
pcov
pdo_sqlite
pdo_mysql
pdo_pgsql

openssl
calendar
soap
mbstring
exif
fileinfo
gd
curl
zip
xmlwriter
xdebug
];
extraConfig = options;
};

in mkShell {
name = "php74-dev";

buildInputs = [
# Install PHP and composer
phpOverride
phpOverride.packages.composer

# Install Github CLi
gh

# Install Symfony CLi
symfony-cli

# Install GNU Make for shorthands
gnumake
];
}
(import ../common.nix) { inherit pkgs; phpPkg = pkgs.php80;}