1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

grocy: 4.0.0 -> 4.0.2

This commit is contained in:
Ember Keske 2023-08-19 13:50:47 +02:00
parent 4fe4a74fe5
commit 0b1ef8ea9e
4 changed files with 17 additions and 17 deletions

View file

@ -115,9 +115,9 @@ in {
user = "grocy";
group = "nginx";
# PHP 8.1 is the only version which is supported/tested by upstream:
# https://github.com/grocy/grocy/blob/v4.0.0/README.md#platform-support
phpPackage = pkgs.php81;
# PHP 8.1 and 8.2 are the only version which are supported/tested by upstream:
# https://github.com/grocy/grocy/blob/v4.0.2/README.md#platform-support
phpPackage = pkgs.php82;
inherit (cfg.phpfpm) settings;

View file

@ -1,4 +1,4 @@
From 3ec6fce101083d4f23641fd015cbe4ade317ad59 Mon Sep 17 00:00:00 2001
From 231ee836e357b83cc2fc0a3a977f74839308ec68 Mon Sep 17 00:00:00 2001
From: Ember Keske <git@n0emis.eu>
Date: Wed, 2 Aug 2023 06:36:02 +0200
Subject: [PATCH 1/2] Define configs with env vars
@ -11,7 +11,7 @@ Subject: [PATCH 1/2] Define configs with env vars
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/app.php b/app.php
index 31905be6..30b3eb82 100644
index bc5b1b39..26f7687e 100644
--- a/app.php
+++ b/app.php
@@ -12,7 +12,7 @@ use Slim\Views\Blade;
@ -23,16 +23,16 @@ index 31905be6..30b3eb82 100644
require_once __DIR__ . '/config-dist.php'; // For not in own config defined values we use the default ones
require_once __DIR__ . '/helpers/ConfigurationValidator.php';
@@ -63,7 +63,7 @@ $app = AppFactory::create();
@@ -64,7 +64,7 @@ $app = AppFactory::create();
$container = $app->getContainer();
$container->set('view', function (Container $container) {
$container->set('view', function (Container $container)
{
- return new Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
+ return new Blade(__DIR__ . '/views', getenv('GROCY_CACHE_DIR'));
});
$container->set('UrlManager', function (Container $container) {
@@ -103,7 +103,7 @@ $errorMiddleware->setDefaultErrorHandler(
$container->set('UrlManager', function (Container $container)
@@ -106,7 +106,7 @@ $errorMiddleware->setDefaultErrorHandler(
$app->add(new CorsMiddleware($app->getResponseFactory()));
@ -42,10 +42,10 @@ index 31905be6..30b3eb82 100644
ob_clean(); // No response output before here
$app->run();
diff --git a/services/DatabaseService.php b/services/DatabaseService.php
index be5486b6..b6091ee7 100644
index 4a05bda1..ce41ed17 100644
--- a/services/DatabaseService.php
+++ b/services/DatabaseService.php
@@ -104,6 +104,6 @@ class DatabaseService
@@ -125,6 +125,6 @@ class DatabaseService
return GROCY_DATAPATH . '/grocy_' . $dbSuffix . '.db';
}
@ -67,10 +67,10 @@ index 7d070350..a6dd4b08 100644
{
mkdir($this->StoragePath);
diff --git a/services/StockService.php b/services/StockService.php
index 16cb468c..23228803 100644
index 7265e82b..13af591a 100644
--- a/services/StockService.php
+++ b/services/StockService.php
@@ -1769,7 +1769,7 @@ class StockService extends BaseService
@@ -1761,7 +1761,7 @@ class StockService extends BaseService
throw new \Exception('No barcode lookup plugin defined');
}

View file

@ -1,4 +1,4 @@
From 0e834aa0ef712ce97acf24c05c43a04387fda18c Mon Sep 17 00:00:00 2001
From b532add2d1287489d4541e79c976bb77795696cd Mon Sep 17 00:00:00 2001
From: Ember Keske <git@n0emis.eu>
Date: Wed, 2 Aug 2023 06:36:46 +0200
Subject: [PATCH 2/2] Remove check for config-file as it's stored in /etc/grocy

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "grocy";
version = "4.0.0";
version = "4.0.2";
src = fetchurl {
url = "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip";
sha256 = "sha256-Sei+UYM5azzSWgnmgufxDl5ySbYJ52DBGPc0nTjnqqc=";
sha256 = "sha256-ZhXfZKmfg8lSzEAGIj7LMIfvaHG1FY5j+/OpOCTxm3c=";
};
nativeBuildInputs = [ unzip ];