Skip to content

Commit

Permalink
add xdebug to flake
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Jun 30, 2024
1 parent 7642779 commit 7818fdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ mocha: node_modules

.PHONY: phpunit
phpunit:
DB_PORT=5434 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres ./vendor/bin/phpunit test
XDEBUG_CONFIG="idekey=PHPSTORM" XDEBUG_MODE=debug DB_PORT=5434 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres \
./vendor/bin/phpunit test

.PHONY: test
tests: phpunit mocha
Expand Down
11 changes: 10 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
LD=$CC ${pkgs.nodejs_20}/bin/node $@
'';
inherit (flocken.legacyPackages.${system}) mkDockerManifest;

phpVersion = "php82";
phpPackages = pkgs."${phpVersion}Packages";
phpPackage = pkgs.${phpVersion}.buildEnv {
extraConfig = "memory_limit = 2G";
extensions = ({ enabled, all }: enabled ++ (with all; [
xdebug smbclient
]));
};
in rec {
packages = rec {
inherit (pkgs) demostf-api demostf-api-docker demostf-parser;
Expand All @@ -52,7 +61,7 @@
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gnumake
php
phpPackage
phpPackages.composer
npmLd
nodeLd
Expand Down

0 comments on commit 7818fdd

Please sign in to comment.