No description
Find a file
Sander van der Burg e66636acb9 Initial commit
2017-07-07 22:51:59 +02:00
bin Initial commit 2017-07-07 22:51:59 +02:00
src/Composer2Nix Initial commit 2017-07-07 22:51:59 +02:00
.gitignore Initial commit 2017-07-07 22:51:59 +02:00
composer.json Initial commit 2017-07-07 22:51:59 +02:00
LICENSE Initial commit 2017-07-07 22:51:59 +02:00
README.md Initial commit 2017-07-07 22:51:59 +02:00

composer2nix

composer2nix is a tool that can be used to generate Nix expressions for PHP composer packages.

Nix integration makes it possible to use the Nix package manager (as opposed to composer) to deploy PHP packages including all their required dependencies.

In addition, generated Nix composer packages support convenient integration of PHP applications with NixOS services, such as NixOS' Apache HTTP service.

Usage

You need a project providing both a composer.json and a composer.lock configuration file.

Running the following command generates Nix expressions from the composer configuration files:

$ composer2nix

The above command produces three expressions: php-packages.nix containing the dependencies, composer-env.nix the build infrastructure and default.nix that can be used to compose the package from its dependencies.

Running the following command-line instruction deploys the package with Nix including its dependencies:

$ nix-build

Limitations

Currently, the state of this tool is that it is just a proof on concept implementation. As a result, it is lacking many features and probably buggy. Most importantly, only the zip and git dependencies are supported.

License

The contents of this package is available under the MIT license