nixpkgs/pkgs/servers/web-apps/dolibarr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, nixosTests, stateDir ? "/var/lib/dolibarr" }:
2022-08-14 14:02:46 +00:00
stdenv.mkDerivation rec {
pname = "dolibarr";
2022-12-01 05:43:59 +00:00
version = "16.0.3";
2022-08-14 14:02:46 +00:00
src = fetchFromGitHub {
owner = "Dolibarr";
repo = "dolibarr";
rev = version;
2022-12-01 05:43:59 +00:00
sha256 = "sha256-Zkjmm2DAaAGQc1IigMYDpE5b+YaYU8oFMHZSqBEBsRw=";
2022-08-14 14:02:46 +00:00
};
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; };
2022-08-14 14:02:46 +00:00
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 ];
};
}