diff options
| author | DJ O'Leary <dijitol@proton.me> | 2025-03-03 02:08:53 +0100 |
|---|---|---|
| committer | DJ O'Leary <dijitol@proton.me> | 2025-03-03 02:08:53 +0100 |
| commit | 4690bfc66d627961652615bf94beaa0d9a459532 (patch) | |
| tree | 1775fbb7b4c6b336d222461b832d6aa6336a8d92 /2024/PHP | |
| parent | 4e81b19c2e6f081e45917dc2aac4381d863def83 (diff) | |
feat: Setup nix shells
Diffstat (limited to '2024/PHP')
| -rw-r--r-- | 2024/PHP/.envrc | 1 | ||||
| -rw-r--r-- | 2024/PHP/shell.nix | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/2024/PHP/.envrc b/2024/PHP/.envrc new file mode 100644 index 0000000..0a722d7 --- /dev/null +++ b/2024/PHP/.envrc @@ -0,0 +1 @@ +use nix; diff --git a/2024/PHP/shell.nix b/2024/PHP/shell.nix new file mode 100644 index 0000000..8b25fa1 --- /dev/null +++ b/2024/PHP/shell.nix @@ -0,0 +1,31 @@ +{ }: + +let + config = { + allowUnfree = true; + }; + pkgs = import <nixpkgs> { inherit config; }; + + phpVersion = "php84"; + + phpPackage = pkgs.lib.attrByPath [ phpVersion ] null pkgs; + phpPackages = pkgs.lib.attrByPath [ "${phpVersion}Packages" ] null pkgs; + phpExtensions = pkgs.lib.attrByPath [ "${phpVersion}Extensions" ] null pkgs; +in +pkgs.mkShell { + # build tools + nativeBuildInputs = with pkgs; [ + phpPackage + nodejs_18 + ]; + # dependencies + buildInputs = with pkgs; [ + intelephense + phpunit + phpPackages.php-cs-fixer + phpPackages.phpstan + phpExtensions.xdebug + + gh # GitHub CLI + ]; +} |
