4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, unzip, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "grocy";
|
|
version = "3.0.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/grocy/grocy/releases/download/v${version}/grocy_${version}.zip";
|
|
sha256 = "sha256-Yjxv0LcLNtpYs4ntBano9NUxwdWgF5etA/M6hUVzOa8=";
|
|
};
|
|
|
|
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.
|
|
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 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/";
|
|
};
|
|
}
|