3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/grocy/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, unzip, nixosTests }:
2020-02-07 15:34:48 +00:00
stdenv.mkDerivation rec {
pname = "grocy";
2022-02-12 09:41:46 +00:00
version = "3.2.0";
2020-02-07 15:34:48 +00:00
src = fetchurl {
url = "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip";
2022-02-12 09:41:46 +00:00
sha256 = "sha256-UPawutm5MllPYdru+Rpk8UYfHDNcrNYaq4qMbZksouI=";
2020-02-07 15:34:48 +00:00
};
nativeBuildInputs = [ unzip ];
unpackPhase = ''
unzip ${src} -d .
'';
# NOTE: if patches are created from a git checkout, those should be modified
# with `unixdos` to make sure those apply here.
2020-04-16 18:24:51 +01: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 22:46:07 +00:00
patchFlags = [ "--binary" "-p1" ];
2020-02-07 15:34:48 +00:00
dontBuild = true;
passthru.tests = { inherit (nixosTests) grocy; };
2020-02-07 15:34:48 +00:00
installPhase = ''
mkdir -p $out/
cp -R . $out/
'';
meta = with lib; {
2020-02-07 15:34:48 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ma27 ];
description = "ERP beyond your fridge - grocy is a web-based self-hosted groceries & household management solution for your home";
homepage = "https://grocy.info/";
};
}