dae973cb59
GitOrigin-RevId: c90c4025bb6e0c4eaf438128a3b2640314b1c58d
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ stdenv, lib, fetchFromGitHub, nixosTests, stateDir ? "/var/lib/dolibarr" }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dolibarr";
|
|
version = "16.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Dolibarr";
|
|
repo = "dolibarr";
|
|
rev = version;
|
|
sha256 = "sha256-H0f12pEsRxq6cYrcCjjQF1b5PFQEPBfYhZ5YnBfIbHk=";
|
|
};
|
|
|
|
dontBuild = true;
|
|
|
|
postPatch = ''
|
|
find . -type f -name "*.php" -print0 | xargs -0 sed -i 's|/etc/dolibarr|${stateDir}|g'
|
|
|
|
substituteInPlace htdocs/filefunc.inc.php \
|
|
--replace '//$conffile = ' '$conffile = ' \
|
|
--replace '//$conffiletoshow = ' '$conffiletoshow = '
|
|
|
|
substituteInPlace htdocs/install/inc.php \
|
|
--replace '//$conffile = ' '$conffile = ' \
|
|
--replace '//$conffiletoshow = ' '$conffiletoshow = '
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out"
|
|
cp -r * $out
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) dolibarr; };
|
|
|
|
meta = with lib; {
|
|
description = "A enterprise resource planning (ERP) and customer relationship manager (CRM) server";
|
|
homepage = "https://dolibarr.org/";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.raitobezarius ];
|
|
};
|
|
}
|