{
  description = "A very basic flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    nix-shell.url = "github:loophp/nix-shell";
  };

  outputs = { self, nixpkgs, flake-utils, nix-shell }:
    flake-utils.lib.eachDefaultSystem
      (system:
        let
          pkgs = import nixpkgs {
            inherit system;
          };

          php = (nix-shell.api.makePhp system {
            php = "php72";
            withExtensions = [
              "bcmath"
              "curl"
              "dom"
              "gd"
              "gettext"
              "iconv"
              "imagick"
              "intl"
              "mbstring"
              "mysqli"
              "mysqnd"
              "openssl"
              "pdo"
              "pdo_mysql"
              "pdo_sqlite"
              "posix"
              "soap"
              "sodium"
              "tidy"
              "tokenizer"
              "xdebug"
              "xmlreader"
              "xmlwriter"
              "xsl"
              "zip"
            ];
            # withoutExtensions = [ "sodium" ];
            extraConfig = ''
              memory_limit=-1
              max_execution_time=0
              max_input_time=-1
              xdebug.mode=debug
              xdebug.output_dir=/tmp
              xdebug.start_with_request=trigger
              xdebug.client_host=127.0.0.1
              xdebug.client_port=9000
            '';
            flags = {
              apxs2Support = false;
              ztsSupport = false;
            };
          });
        in
        {
          defaultPackage = php;
          devShells = {
            default = pkgs.mkShellNoCC {
              name = "PHP project";

              buildInputs = [
                php
                php.packages.composer
              ];
            };
          };
        }
      );
}
