# mill-scale -- A php module for flakelight # Copyright (C) 2025 Robin Appelman # SPDX-License-Identifier: MIT { description = "A php module for flakelite"; inputs = { nixpkgs.url = "nixpkgs/nixos-25.05"; flakelight = { url = "github:nix-community/flakelight"; inputs.nixpkgs.follows = "nixpkgs"; }; phps = { url = "github:fossar/nix-phps"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { flakelight, phps, ... }: flakelight ./. { imports = [flakelight.flakelightModules.extendFlakelight]; withOverlays = [phps.overlays.default]; formatters = pkgs: with pkgs; { "*.nix" = pkgs.lib.getExe alejandra; }; flakelightModule = {lib, ...}: { imports = [./flakelight-php.nix]; }; checks = { nixTests = pkgs: (import ./nix-tests.nix pkgs) (pkgs: let composerMeta = pkgs.callPackage ./composer-meta.nix { allVersions = ["7.3" "7.4" "8.0" "8.1" "8.2" "8.3" "8.4"]; }; in { testPhpVersionsGt = { expr = (composerMeta {require.php = ">=8.1";}).phpVersions; expected = ["8.1" "8.2" "8.3" "8.4"]; }; testPhpVersionsAnd = { expr = (composerMeta {require.php = ">8.0 <8.4";}).phpVersions; expected = ["8.1" "8.2" "8.3"]; }; testPhpVersionsAndOr = { expr = (composerMeta {require.php = ">8.0 <8.4 || =7.4";}).phpVersions; expected = ["7.4" "8.1" "8.2" "8.3"]; }; }); }; }; }