nixpkgs-suyu/pkgs/desktops/pantheon/apps/appcenter/default.nix
2021-09-22 12:41:18 +08:00

104 lines
1.8 KiB
Nix

{ lib, stdenv
, nix-update-script
, appstream
, appstream-glib
, dbus
, desktop-file-utils
, elementary-gtk-theme
, elementary-icon-theme
, fetchFromGitHub
, flatpak
, gettext
, glib
, granite
, gtk3
, json-glib
, libgee
, libhandy
, libsoup
, libxml2
, meson
, ninja
, packagekit
, pantheon
, pkg-config
, python3
, vala
, polkit
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "appcenter";
version = "3.8.0";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "07lkdpnjj9pxbq8h794qjiidvnysvzx0132w98r1wg9k7ca170bj";
};
patches = [
# Try to remove other backends to make flatpak backend work.
# https://github.com/NixOS/nixpkgs/issues/70214
./flatpak-only.patch
# The homepage banner does not show up on first run,
# has issues with app icon and mouse scrolling.
./drop-homepage-banner.patch
];
passthru = {
updateScript = nix-update-script {
attrPath = "pantheon.${pname}";
};
};
nativeBuildInputs = [
appstream-glib
dbus # for pkg-config
desktop-file-utils
gettext
meson
ninja
pkg-config
python3
vala
wrapGAppsHook
];
buildInputs = [
appstream
elementary-gtk-theme
elementary-icon-theme
flatpak
glib
granite
gtk3
json-glib
libgee
libhandy
libsoup
libxml2
packagekit
polkit
];
mesonFlags = [
"-Dpayments=false"
"-Dcurated=false"
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';
meta = with lib; {
homepage = "https://github.com/elementary/appcenter";
description = "An open, pay-what-you-want app store for indie developers, designed for elementary OS";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};
}