about summary refs log tree commit diff
path: root/pkgs/servers/web-apps/wallabag/wallabag-data.patch
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-01-03 22:06:07 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2018-01-06 12:02:12 +0100
commit012ead33e7477e5a05e6a5c12658ab642555f045 (patch)
tree60797241cb4db13c2300b652fe4dc3fdcf719af0 /pkgs/servers/web-apps/wallabag/wallabag-data.patch
parent40ab1bed8a355ac3ac6ebdef386d1924164d7b76 (diff)
downloadnixlib-012ead33e7477e5a05e6a5c12658ab642555f045.tar
nixlib-012ead33e7477e5a05e6a5c12658ab642555f045.tar.gz
nixlib-012ead33e7477e5a05e6a5c12658ab642555f045.tar.bz2
nixlib-012ead33e7477e5a05e6a5c12658ab642555f045.tar.lz
nixlib-012ead33e7477e5a05e6a5c12658ab642555f045.tar.xz
nixlib-012ead33e7477e5a05e6a5c12658ab642555f045.tar.zst
nixlib-012ead33e7477e5a05e6a5c12658ab642555f045.zip
wallabag: fix config file not being loaded from WALLABAG_DATA
Diffstat (limited to 'pkgs/servers/web-apps/wallabag/wallabag-data.patch')
-rw-r--r--pkgs/servers/web-apps/wallabag/wallabag-data.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/servers/web-apps/wallabag/wallabag-data.patch b/pkgs/servers/web-apps/wallabag/wallabag-data.patch
new file mode 100644
index 000000000000..086e93959800
--- /dev/null
+++ b/pkgs/servers/web-apps/wallabag/wallabag-data.patch
@@ -0,0 +1,26 @@
+diff --git a/app/AppKernel.php b/app/AppKernel.php
+index 40726f05..7d44e600 100644
+--- a/app/AppKernel.php
++++ b/app/AppKernel.php
+@@ -58,14 +58,19 @@ class AppKernel extends Kernel
+         return $bundles;
+     }
+ 
++    public function getProjectDir()
++    {
++        return getenv('WALLABAG_DATA') ?: dirname(__DIR__);
++    }
++
+     public function getCacheDir()
+     {
+-        return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
++        return $this->getProjectDir() . '/var/cache/' . $this->getEnvironment();
+     }
+ 
+     public function getLogDir()
+     {
+-        return dirname(__DIR__) . '/var/logs';
++        return $this->getProjectDir() . '/var/logs';
+     }
+ 
+     public function registerContainerConfiguration(LoaderInterface $loader)