dev-templates/php/flake.nix

29 lines
560 B
Nix
Raw Normal View History

2022-09-28 00:34:13 -07:00
{
description = "A Nix-flake-based PHP development environment";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs =
{ self
, flake-utils
, nixpkgs
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
2022-09-28 00:34:13 -07:00
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ phpPackages.composer php ];
2022-09-28 00:34:13 -07:00
shellHook = ''
echo "`${pkgs.php}/bin/php --version`"
'';
};
});
}