diff --git a/flake.lock b/flake.lock index d2c004a..f37a93f 100644 --- a/flake.lock +++ b/flake.lock @@ -36,10 +36,27 @@ "type": "github" } }, + "nixpkgs-php74": { + "locked": { + "lastModified": 1651667340, + "narHash": "sha256-OUOe8zZ53ZlmATiNdhYkEIwbXAs9ZYrPhsRJwCS6VQI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "81b77fd3847a2eb23618b7cbaa23049ba6139fa2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "81b77fd3847a", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-php74": "nixpkgs-php74" } } }, diff --git a/flake.nix b/flake.nix index 8cfbe00..428cd3e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,8 @@ flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + nixpkgs-php74.url = "github:nixos/nixpkgs/81b77fd3847a"; }; outputs = @@ -13,6 +15,7 @@ imports = [ ./modules/nodejs.nix + ./modules/php74.nix ./modules/php81.nix ./modules/php82.nix ./modules/php83.nix diff --git a/modules/php74.nix b/modules/php74.nix new file mode 100644 index 0000000..6f73a4c --- /dev/null +++ b/modules/php74.nix @@ -0,0 +1,25 @@ +{ inputs, ... }: + +{ + perSystem = + { pkgs, system, ... }: + let + pkgs-php74 = import inputs.nixpkgs-php74 { inherit system; }; + + php = pkgs-php74.php74; + phpPackages = pkgs-php74.php74Packages; + in + { + devShells.php74 = pkgs.mkShell { + packages = with pkgs; [ + php + phpPackages.composer + phpactor + ]; + + shellHook = '' + php --version + ''; + }; + }; +}