mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
38 lines
972 B
Nix
38 lines
972 B
Nix
{ stdenv, fetchurl, unzip, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "grocy";
|
|
version = "2.7.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip";
|
|
sha256 = "0ab1yxj499vadakq2c1lils3ir6fm02wrdgrirrlar4s4z6c4p7r";
|
|
};
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
unpackPhase = ''
|
|
unzip ${src} -d .
|
|
'';
|
|
|
|
patches = [
|
|
./0001-Define-configs-with-env-vars.patch
|
|
./0002-Remove-check-for-config-file-as-it-s-stored-in-etc-g.patch
|
|
];
|
|
patchFlags = [ "--binary" "-p1" ];
|
|
|
|
dontBuild = true;
|
|
|
|
passthru.tests = { inherit (nixosTests) grocy; };
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/
|
|
cp -R . $out/
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
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/";
|
|
};
|
|
}
|