From 19ec217ead278c477fea80f38aa6ef5739131344 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Mon, 9 Oct 2017 22:23:18 +0200 Subject: [PATCH] - Add Hydra release expression - Document proper way to configure PHP in NixOS --- README.md | 6 +++--- release.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 release.nix diff --git a/README.md b/README.md index 630a750..b3c0565 100644 --- a/README.md +++ b/README.md @@ -115,12 +115,12 @@ let }; in { + time.timeZone = "UTC"; + services.httpd = { enable = true; adminAddr = "admin@localhost"; - extraModules = [ - { name = "php7"; path = "${pkgs.php}/modules/libphp7.so"; } - ]; + enablePHP = true; documentRoot = myexampleapp; }; diff --git a/release.nix b/release.nix new file mode 100644 index 0000000..633ef96 --- /dev/null +++ b/release.nix @@ -0,0 +1,27 @@ +{ nixpkgs ? +, systems ? [ "x86_64-linux" ] +}: + +let + pkgs = import nixpkgs {}; +in +{ + package = pkgs.lib.genAttrs systems (system: (import ./default.nix { + inherit pkgs system; + noDev = true; + }).override { + executable = true; + }); + + dev = pkgs.lib.genAttrs systems (system: (import ./default.nix { + inherit pkgs system; + }).override (oldAttrs: { + buildInputs = oldAttrs.buildInputs ++ [ pkgs.graphviz ]; + executable = true; + postInstall = '' + vendor/bin/phpdoc + mkdir -p $out/nix-support + echo "doc api $out/doc" >> $out/nix-support/hydra-build-products + ''; + })); +}