freescout: init at 1.8.225
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
From 1c749a3610fb423e50260a2c807b44a94ef4c69d Mon Sep 17 00:00:00 2001
|
||||
From: Nina Fromm <git@e1mo.de>
|
||||
Date: Thu, 25 Jun 2026 16:23:00 +0200
|
||||
Subject: [PATCH] settings: catch unwritable .env
|
||||
|
||||
---
|
||||
app/Misc/Helper.php | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/Misc/Helper.php b/app/Misc/Helper.php
|
||||
index 2d647b89..3fc2ef84 100644
|
||||
--- a/app/Misc/Helper.php
|
||||
+++ b/app/Misc/Helper.php
|
||||
@@ -1172,7 +1172,12 @@ class Helper
|
||||
$contents = $contents."\n{$key}={$value}\n";
|
||||
}
|
||||
}
|
||||
- \File::put($env_path, $contents);
|
||||
+ try {
|
||||
+ \File::put($env_path, $contents);
|
||||
+ } catch (\Exception $e) {
|
||||
+ \Helper::logException($e, 'Error updating ' . $key .' in .env file: ');
|
||||
+ \Session::flash('flash_error_unescaped', "Unable to write settings to <code>$env_path</code>: " . $e->getMessage());
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
preferLocalBuild = true;
|
||||
pname = "freescout";
|
||||
version = "1.8.225";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "freescout-help-desk";
|
||||
repo = "freescout";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-kXZ6bjF36YO1p6q+KTugnBO+KxqQZci5O0RNM7lqecQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-settings-catch-unwritable-.env.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
rm -rf storage
|
||||
rm bootstrap/cache/.gitignore
|
||||
rm public/{css,js}/builds/.htaccess
|
||||
rm {Modules,public/modules}/.gitkeep
|
||||
rmdir Modules public/modules bootstrap/cache public/{css,js}/builds
|
||||
ln -rs data/.env .env
|
||||
ln -rs data/storage storage
|
||||
ln -rs data/bootstrap/cache bootstrap/cache
|
||||
ln -rs data/storage/app/public public/storage
|
||||
ln -rs data/public/css/builds public/css/builds
|
||||
ln -rs data/public/js/builds public/js/builds
|
||||
ln -rs data/Modules Modules
|
||||
ln -rs data/public/modules public/modules
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/freescout
|
||||
cp -ar . $out/share/freescout
|
||||
chmod +x $out/share/freescout/artisan
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Because freescout is searching for some folders only relative to it's own source location, we need to have the symlinks to the actual locations in here
|
||||
dontCheckForBrokenSymlinks = true;
|
||||
strictDeps = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Free self-hosted help desk & shared mailbox";
|
||||
license = licenses.agpl3Only;
|
||||
homepage = "https://freescout.net/";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ e1mo ];
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user