nixpkgs/pkgs/applications/office/envelope/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

82 lines
1.5 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, nix-update-script
, fetchpatch
, meson
, ninja
, pkgconfig
, pantheon
, python3
, vala
, appstream-glib
, desktop-file-utils
, gettext
, glib
, gtk3
, libgee
, sqlite
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "envelope";
version = "0.0.4";
src = fetchFromGitHub {
owner = "cjfloss";
repo = pname;
rev = version;
sha256 = "111lq1gijcm7qwpac09q11ymwiw2x3m12a28ki52f28fb1amvffc";
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
gettext
meson
ninja
vala
pkgconfig
python3
wrapGAppsHook
];
buildInputs = [
glib
gtk3
libgee
pantheon.granite
sqlite
];
doCheck = true;
patches = [
# Fix AppData Validation.
# https://github.com/cjfloss/envelope/pull/59
(fetchpatch {
url = "https://github.com/cjfloss/envelope/commit/b6a28eced89b8f944479fcc695aebfb9aae0c691.patch";
sha256 = "11znc8z52kl893n3gmmdpnp3y4vpzmb263m5gp0qxbl3xykq2wzr";
})
];
postPatch = ''
chmod +x data/post_install.py
patchShebangs data/post_install.py
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "Personal finance manager for elementary OS";
homepage = "https://github.com/cjfloss/envelope";
maintainers = with maintainers; [ xiorcale ] ++ pantheon.maintainers;
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}