mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
Enabled access to binaries of needed tools, and worker daemons can be enabled for phabricator #3306
This commit is contained in:
parent
dae0d770fc
commit
fe3f7716f0
6 changed files with 125 additions and 26 deletions
|
@ -1,35 +1,30 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
phabricatorRoot = pkgs.stdenv.mkDerivation rec {
|
||||
version = "2014-05-12";
|
||||
name = "phabricator-${version}";
|
||||
srcLibphutil = pkgs.fetchgit {
|
||||
url = git://github.com/facebook/libphutil.git;
|
||||
rev = "2f3b5a1cf6ea464a0250d4b1c653a795a90d2716";
|
||||
sha256 = "9598cec400984dc149162f1e648814a54ea0cd34fcd529973dc83f5486fdd9fd";
|
||||
};
|
||||
srcArcanist = pkgs.fetchgit {
|
||||
url = git://github.com/facebook/arcanist.git;
|
||||
rev = "54c377448db8dbc40f0ca86d43c837d30e493485";
|
||||
sha256 = "086db3c0d1154fbad23e7c6def31fd913384ee20247b329515838b669c3028e0";
|
||||
};
|
||||
srcPhabricator = pkgs.fetchgit {
|
||||
url = git://github.com/facebook/phabricator.git;
|
||||
rev = "1644ef185ecf1e9fca3eb6b16351ef46b19d110f";
|
||||
sha256 = "e1135e4ba76d53f48aad4161563035414ed7e878f39a8a34a875a01b41b2a084";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
cp -R ${srcLibphutil} $out/libphutil
|
||||
cp -R ${srcArcanist} $out/arcanist
|
||||
cp -R ${srcPhabricator} $out/phabricator
|
||||
'';
|
||||
};
|
||||
phabricatorRoot = pkgs.phabricator;
|
||||
in {
|
||||
|
||||
enablePHP = true;
|
||||
extraApacheModules = [ "mod_rewrite" ];
|
||||
DocumentRoot = "${phabricatorRoot}/phabricator/webroot";
|
||||
|
||||
options = {
|
||||
git = mkOption {
|
||||
default = true;
|
||||
description = "Enable git repositories.";
|
||||
};
|
||||
mercurial = mkOption {
|
||||
default = true;
|
||||
description = "Enable mercurial repositories.";
|
||||
};
|
||||
subversion = mkOption {
|
||||
default = true;
|
||||
description = "Enable subversion repositories.";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
DocumentRoot ${phabricatorRoot}/phabricator/webroot
|
||||
|
||||
|
@ -38,4 +33,18 @@ in {
|
|||
RewriteRule ^/favicon.ico - [L,QSA]
|
||||
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
|
||||
'';
|
||||
|
||||
extraServerPath = [
|
||||
"${pkgs.which}"
|
||||
"${pkgs.diffutils}"
|
||||
] ++
|
||||
(if config.mercurial then ["${pkgs.mercurial}"] else []) ++
|
||||
(if config.subversion then ["${pkgs.subversion}"] else []) ++
|
||||
(if config.git then ["${pkgs.git}"] else []);
|
||||
|
||||
startupScript = pkgs.writeScript "activatePhabricator" ''
|
||||
mkdir -p /var/repo
|
||||
chown wwwrun /var/repo
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue