2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, unzip, nixosTests }:
|
2020-02-07 16:34:48 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "grocy";
|
2023-09-12 20:32:58 +02:00
|
|
|
version = "4.0.3";
|
2020-02-07 16:34:48 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip";
|
2023-09-12 20:32:58 +02:00
|
|
|
hash = "sha256-KBTsi634SolgA01eRthMuWx7DIF7rhvJSPxiHyuKSR8=";
|
2020-02-07 16:34:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
unpackPhase = ''
|
|
|
|
unzip ${src} -d .
|
|
|
|
'';
|
|
|
|
|
2020-12-22 16:00:33 +01:00
|
|
|
# NOTE: if patches are created from a git checkout, those should be modified
|
|
|
|
# with `unixdos` to make sure those apply here.
|
2020-04-16 19:24:51 +02:00
|
|
|
patches = [
|
|
|
|
./0001-Define-configs-with-env-vars.patch
|
|
|
|
./0002-Remove-check-for-config-file-as-it-s-stored-in-etc-g.patch
|
|
|
|
];
|
2020-03-06 23:46:07 +01:00
|
|
|
patchFlags = [ "--binary" "-p1" ];
|
2020-02-07 16:34:48 +01:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2020-04-15 22:00:14 +02:00
|
|
|
passthru.tests = { inherit (nixosTests) grocy; };
|
|
|
|
|
2020-02-07 16:34:48 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-02-07 16:34:48 +01:00
|
|
|
license = licenses.mit;
|
2023-08-19 13:02:04 +02:00
|
|
|
maintainers = with maintainers; [ n0emis ];
|
2020-02-07 16:34:48 +01:00
|
|
|
description = "ERP beyond your fridge - grocy is a web-based self-hosted groceries & household management solution for your home";
|
|
|
|
homepage = "https://grocy.info/";
|
|
|
|
};
|
|
|
|
}
|