PHP: Difference between revisions

link phpfpm wiki page
Klinger (talk | contribs)
m Category:PHP added
 
(2 intermediate revisions by 2 users not shown)
Line 221: Line 221:
   };
   };
};
};
</syntaxhighlight>
== Use php Packages with Extensions in a nix-shell ==
To use php packages with some extensions enabled, create a <code>shell.nix</code> similar to the following:
<syntaxhighlight lang="nix>
{ pkgs ? import <nixpkgs> { } }:
let
  phpEnv = pkgs.php.buildEnv {
    extensions = { enabled, all }: enabled ++ (with all; [ xsl ]);
    extraConfig = "memory_limit=-1";
  };
in
pkgs.mkShell {
  buildInputs = with pkgs; [
    phpEnv
    phpEnv.packages.composer
    symfony-cli
  ];
}
</syntaxhighlight>
</syntaxhighlight>


Line 237: Line 258:
}
}
</syntaxhighlight>
</syntaxhighlight>
[[Category:Languages]]
[[Category:PHP]]