diff options
author | Aaron Andersen <aaron@fosslib.net> | 2022-09-04 07:55:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 07:55:34 -0400 |
commit | 5b62b0d2cec04b1c32d308b12388a53cea71deed (patch) | |
tree | 15589f747a387733351525c6d9b96585b20791c0 /pkgs/servers | |
parent | 96cce9c13693d853fb7f829f1bdb5ac4287de7bc (diff) | |
parent | c2563fe47629b32fd3d2505030d6b44ac2f07736 (diff) |
Merge pull request #189635 from RaitoBezarius/nixos/dolibarr
dolibarr: init at 15.0.3, nixos/dolibarr: init
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/web-apps/dolibarr/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/servers/web-apps/dolibarr/default.nix b/pkgs/servers/web-apps/dolibarr/default.nix new file mode 100644 index 000000000000..5c4256155ddc --- /dev/null +++ b/pkgs/servers/web-apps/dolibarr/default.nix @@ -0,0 +1,41 @@ +{ stdenv, lib, fetchFromGitHub, nixosTests, stateDir ? "/var/lib/dolibarr" }: + +stdenv.mkDerivation rec { + pname = "dolibarr"; + version = "15.0.3"; + + src = fetchFromGitHub { + owner = "Dolibarr"; + repo = "dolibarr"; + rev = version; + sha256 = "sha256-HMOYj93ZvqM0FQjt313yuGj/r9ELqQlnNkg/CxrBjRM="; + }; + + 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 ]; + }; +} |