From 34cf715ecdc953100a7f8f84c73001814d0a1bc9 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 15 Jul 2026 14:27:30 +0200 Subject: [PATCH] add dev flake --- .envrc | 1 + .gitignore | 2 ++ flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 36 ++++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 3ca03c7..2076309 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ vendor coverage.xml .phpunit.result.cache *.cache +.direnv +result \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8ddde61 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1784116681, + "narHash": "sha256-uZG9aPDw/etKcm3fxWq/kGLdiZMfoYLwL1xXXvlZKOM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2b0cc8dd9c2187ee301fd39bd52dfbf418d01180", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-26.05", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..37368ee --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/release-26.05"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + nixpkgs, + utils, + }: + utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + }; + phpPackages = pkgs.phpPackages; + phpPackage = pkgs.php.buildEnv { + extensions = { + enabled, + all, + }: + enabled + ++ (with all; [ + xmlwriter + ]); + }; + in { + devShells.default = pkgs.mkShell { + nativeBuildInputs = [ + phpPackage + phpPackages.composer + (phpPackages.box.override {php82 = phpPackage;}) + ]; + }; + }); +}