summaryrefslogtreecommitdiff
path: root/php/2024/flake.nix
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2026-06-26 18:04:09 +0200
committerDJ O'Leary <dijitol@proton.me>2026-06-26 18:04:09 +0200
commit6d8fb621d1e93b83786890d6d9cb6f0d8defa8ae (patch)
tree17c90d3984c114aa023600cc5bec6f6004b02243 /php/2024/flake.nix
parentad4ea5ca4bc9f7540ee1d6a4fa2d881709dc6459 (diff)
refactor!: invert repo directory structure
now is language first
Diffstat (limited to 'php/2024/flake.nix')
-rw-r--r--php/2024/flake.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/php/2024/flake.nix b/php/2024/flake.nix
new file mode 100644
index 0000000..2be5644
--- /dev/null
+++ b/php/2024/flake.nix
@@ -0,0 +1,43 @@
+{
+ description = "Advent of Code 2024: PHP";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ };
+
+ outputs =
+ { nixpkgs, ... }:
+ let
+ pkgs = import nixpkgs {
+ config.allowUnfree = true;
+ };
+ in
+ {
+ devShells.x86_64-linux.default =
+ let
+ 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
+ ];
+ };
+
+ };
+}