snipe-it: Substitute path to mysqldump

Snipe-IT has an internal command for backup creation
(i.e. `snipe-it snipeit:backup`) which relies on a hardcoded path to
the `mysqldump` binary.
This commit is contained in:
M. A 2022-07-08 20:28:33 +00:00
parent 1e12b9292c
commit f6c77b183f

View File

@ -1,4 +1,4 @@
{ pkgs, stdenv, lib, fetchFromGitHub, dataDir ? "/var/lib/snipe-it" }:
{ pkgs, stdenv, lib, fetchFromGitHub, dataDir ? "/var/lib/snipe-it", mariadb }:
let
package = (import ./composition.nix {
@ -13,6 +13,7 @@ let
ln -s ${dataDir}/public/uploads $out/public/uploads
ln -s ${dataDir}/bootstrap/cache $out/bootstrap/cache
chmod +x $out/artisan
substituteInPlace config/database.php --replace "env('DB_DUMP_PATH', '/usr/local/bin')" "env('DB_DUMP_PATH', '${mariadb}/bin')"
'';
});