summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-07-23 17:53:35 +0200
committerGitHub <noreply@github.com>2021-07-23 17:53:35 +0200
commit42c7bd28e38152523ee8ef5f750f0a7e26aa4e44 (patch)
treeb61a8c007a173eb8161e2d58553ebb212558f95b
parent474736d1c87fb5355b63f0fefff4443defee7160 (diff)
parent07b51f58df6042e0baaff5e10b0ca389f2cac1fe (diff)
downloadnixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.tar
nixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.tar.gz
nixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.tar.bz2
nixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.tar.lz
nixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.tar.xz
nixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.tar.zst
nixpkgs-42c7bd28e38152523ee8ef5f750f0a7e26aa4e44.zip
Merge pull request #131215 from Ma27/bump-grocy
grocy: 3.0.1 -> 3.1.0
-rw-r--r--nixos/tests/grocy.nix2
-rw-r--r--pkgs/servers/grocy/0001-Define-configs-with-env-vars.patch40
-rw-r--r--pkgs/servers/grocy/default.nix4
3 files changed, 23 insertions, 23 deletions
diff --git a/nixos/tests/grocy.nix b/nixos/tests/grocy.nix
index 220c55b1f63..2be5c24ecb5 100644
--- a/nixos/tests/grocy.nix
+++ b/nixos/tests/grocy.nix
@@ -40,7 +40,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
 
     assert task_name == "Test Task"
 
-    machine.succeed("curl -sSfI http://localhost/api/tasks 2>&1 | grep '401 Unauthorized'")
+    machine.succeed("curl -sSI http://localhost/api/tasks 2>&1 | grep '401 Unauthorized'")
 
     machine.shutdown()
   '';
diff --git a/pkgs/servers/grocy/0001-Define-configs-with-env-vars.patch b/pkgs/servers/grocy/0001-Define-configs-with-env-vars.patch
index 0d6ae781b75..4e3d36c33c9 100644
--- a/pkgs/servers/grocy/0001-Define-configs-with-env-vars.patch
+++ b/pkgs/servers/grocy/0001-Define-configs-with-env-vars.patch
@@ -1,7 +1,7 @@
-From 7ed6c641cc501246931721700b73f40dce7e8f4b Mon Sep 17 00:00:00 2001

+From 035709eeac697945a26276cc17b996c1a0678ddc Mon Sep 17 00:00:00 2001

 From: Maximilian Bosch <maximilian@mbosch.me>

 Date: Tue, 22 Dec 2020 15:38:56 +0100

-Subject: [PATCH 1/2] Define configs with env vars

+Subject: [PATCH] Define configs with env vars

 

 ---

  app.php                      | 4 ++--

@@ -11,32 +11,32 @@ Subject: [PATCH 1/2] Define configs with env vars
  4 files changed, 5 insertions(+), 6 deletions(-)

 

 diff --git a/app.php b/app.php

-index 8176ebe..04432ba 100644

+index 17ba6a99..89f48089 100644

 --- a/app.php

 +++ b/app.php

-@@ -10,7 +10,7 @@ use Slim\Factory\AppFactory;

+@@ -11,7 +11,7 @@ use Slim\Views\Blade;

  require_once __DIR__ . '/vendor/autoload.php';

  

  // Load config files

 -require_once GROCY_DATAPATH . '/config.php';

 +require_once getenv('GROCY_CONFIG_FILE');

  require_once __DIR__ . '/config-dist.php'; // For not in own config defined values we use the default ones

+ require_once __DIR__ . '/helpers/ConfigurationValidator.php';

  

- // Definitions for dev/demo/prerelease mode

-@@ -37,7 +37,7 @@ $app = AppFactory::create();

+@@ -62,7 +62,7 @@ $app = AppFactory::create();

  

  $container = $app->getContainer();

  $container->set('view', function (Container $container) {

--	return new Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');

-+	return new Slim\Views\Blade(__DIR__ . '/views', getenv('GROCY_CACHE_DIR'));

+-	return new Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');

++	return new Blade(__DIR__ . '/views', getenv('GROCY_CACHE_DIR'));

  });

+ 

  $container->set('UrlManager', function (Container $container) {

- 	return new UrlManager(GROCY_BASE_URL);

 diff --git a/services/DatabaseService.php b/services/DatabaseService.php

-index d1080b0..8bc4ee1 100644

+index dfcd5d4b..bc8d1a1d 100644

 --- a/services/DatabaseService.php

 +++ b/services/DatabaseService.php

-@@ -105,6 +105,6 @@ class DatabaseService

+@@ -107,6 +107,6 @@ class DatabaseService

  			return GROCY_DATAPATH . '/grocy_' . $dbSuffix . '.db';

  		}

  

@@ -45,23 +45,23 @@ index d1080b0..8bc4ee1 100644
  	}

  }

 diff --git a/services/FilesService.php b/services/FilesService.php

-index 8c1483e..8f74b4b 100644

+index 7d070350..fba2e923 100644

 --- a/services/FilesService.php

 +++ b/services/FilesService.php

-@@ -70,7 +70,7 @@ class FilesService extends BaseService

- 	{

- 		parent::__construct();

+@@ -103,7 +103,7 @@ class FilesService extends BaseService

  

--		$this->StoragePath = GROCY_DATAPATH . '/storage';

+ 	public function GetFilePath($group, $fileName)

+ 	{

+-		$groupFolderPath = $this->StoragePath . '/' . $group;

 +		$this->StoragePath = getenv('GROCY_STORAGE_DIR');

  

- 		if (!file_exists($this->StoragePath))

+ 		if (!file_exists($groupFolderPath))

  		{

 diff --git a/services/StockService.php b/services/StockService.php

-index 4741b4b..6d4e748 100644

+index f73ac5bd..6b6e693a 100644

 --- a/services/StockService.php

 +++ b/services/StockService.php

-@@ -1374,8 +1374,7 @@ class StockService extends BaseService

+@@ -1589,8 +1589,7 @@ class StockService extends BaseService

  			throw new \Exception('No barcode lookup plugin defined');

  		}

  

@@ -72,5 +72,5 @@ index 4741b4b..6d4e748 100644
  		{

  			require_once $path;

 -- 

-2.29.2

+2.31.1

 

diff --git a/pkgs/servers/grocy/default.nix b/pkgs/servers/grocy/default.nix
index bd9a02f7b91..96c7cbbdf71 100644
--- a/pkgs/servers/grocy/default.nix
+++ b/pkgs/servers/grocy/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "grocy";
-  version = "3.0.1";
+  version = "3.1.0";
 
   src = fetchurl {
     url = "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip";
-    sha256 = "sha256-Yjxv0LcLNtpYs4ntBano9NUxwdWgF5etA/M6hUVzOa8=";
+    sha256 = "sha256-ohviTI2np6z+SjV2CDScouI8Lh2Ru4+CE00KlgT40i8=";
   };
 
   nativeBuildInputs = [ unzip ];