Skip to content

Commit

Permalink
Enable NTS versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 12, 2022
1 parent f63f7c3 commit 11565ae
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ nix develop github:loophp/nix-shell#php81

Available PHP versions are:

* `php56`
* `php70`
* `php71`
* `php72`
* `php73`
* `php74`
* `php74-nodebug`
* `php80`
* `php80-nodebug`
* `php81`
* `php81-nodebug`
* `php56`, `php56-nts`
* `php70`, `php70-nts`
* `php71`, `php71-nts`
* `php72`, `php72-nts`
* `php73`, `php73-nts`
* `php74`, `php74-nts`
* `php74-nodebug`, `php74-nts-nodebug`
* `php80`, `php80-nts`
* `php80-nodebug`, `php80-nts-nodebug`
* `php81`, `php81-nts`
* `php81-nodebug`, `php81-nts-nodebug`

### Customize PHP

Expand Down
107 changes: 107 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,85 +21,192 @@
phps = phps.packages.${system};
version = "php80";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

default-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php80";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php56 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php56";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php56-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php56";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php70 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php70";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php70-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php70";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php71 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php71";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php71-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php71";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php72 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php72";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php72-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php72";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php73 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php73";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php73-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php73";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php74 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php74";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php74-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php74";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php74-nodebug = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php74";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x [all.xdebug all.pcov]) (default all);
ztsSupport = true;
};

php74-nts-nodebug = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php74";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x [all.xdebug all.pcov]) (default all);
ztsSupport = false;
};

php80 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php80";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php80-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php80";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php80-nodebug = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php80";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x [all.xdebug all.pcov]) (default all);
ztsSupport = true;
};

php80-nts-nodebug = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php80";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x [all.xdebug all.pcov]) (default all);
ztsSupport = false;
};

php81 = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php81";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = true;
};

php81-nts = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php81";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x []) (default all);
ztsSupport = false;
};

php81-nodebug = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php81";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x [all.xdebug all.pcov]) (default all);
ztsSupport = true;
};

php81-nts-nodebug = import ./resources/dev/common.nix {
inherit pkgs;
phps = phps.packages.${system};
version = "php81";
phpExtensions = default: { all, ... }: builtins.filter (x: !builtins.elem x [all.xdebug all.pcov]) (default all);
ztsSupport = false;
};
};
}
);
Expand Down
2 changes: 2 additions & 0 deletions resources/dev/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pkgs,
phps,
version,
ztsSupport,
phpExtensions ? { all, ... }: with all; [],
defaultExtensions ? { all, ... }: with all; []
}:
Expand Down Expand Up @@ -51,6 +52,7 @@ let
phpOverride = phps.${version}.buildEnv {
extensions = phpExtensions defaultPhpExtensions;
extraConfig = if builtins.pathExists "${phpIniFile}" then builtins.readFile "${phpIniFile}" else "";
inherit ztsSupport;
};

mkShellNoCC = pkgs.mkShell.override { stdenv = pkgs.stdenvNoCC; };
Expand Down

0 comments on commit 11565ae

Please sign in to comment.