nixpkgs/pkgs/desktops/cinnamon/xapps/default.nix

100 lines
2.0 KiB
Nix
Raw Normal View History

2019-12-08 05:28:47 +00:00
{ fetchFromGitHub
, glib
, gobject-introspection
, gtk3
, libgnomekbd
, gdk-pixbuf
, cairo
, xorg
, meson
, ninja
2021-01-17 02:21:50 +00:00
, pkg-config
2019-12-08 05:28:47 +00:00
, python3
, lib, stdenv
2019-12-08 05:28:47 +00:00
, vala
, wrapGAppsHook
, inxi
, mate
2020-09-05 23:04:25 +01:00
, dbus
, libdbusmenu-gtk3
2019-12-08 05:28:47 +00:00
}:
stdenv.mkDerivation rec {
pname = "xapps";
2021-01-26 20:50:30 +00:00
version = "2.0.6";
2019-12-08 05:28:47 +00:00
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
rev = version;
2021-01-26 20:50:30 +00:00
sha256 = "11qbz547qlfsvkz4bdxhryrsf10aw5jc2f1glbik7pvmmm87gf4f";
2019-12-08 05:28:47 +00:00
};
# TODO: https://github.com/NixOS/nixpkgs/issues/36468
NIX_CFLAGS_COMPILE = [
"-I${glib.dev}/include/gio-unix-2.0"
];
nativeBuildInputs = [
meson
ninja
2021-01-17 02:21:50 +00:00
pkg-config
2019-12-08 05:28:47 +00:00
python3
vala
wrapGAppsHook
];
buildInputs = [
gobject-introspection
2019-12-08 05:28:47 +00:00
(python3.withPackages(ps: with ps; [
pygobject3
setproctitle # mate applet
]))
libgnomekbd
gdk-pixbuf
xorg.libxkbfile
python3.pkgs.pygobject3 # for .pc file
mate.mate-panel # for gobject-introspection
2020-09-05 23:04:25 +01:00
dbus
libdbusmenu-gtk3
2019-12-08 05:28:47 +00:00
];
# Requires in xapp.pc
propagatedBuildInputs = [
gtk3
cairo
glib
];
mesonFlags = [
"-Dpy-overrides-dir=${placeholder "out"}/${python3.sitePackages}/gi/overrides"
];
postPatch = ''
chmod +x schemas/meson_install_schemas.py # patchShebangs requires executable file
patchShebangs \
libxapp/g-codegen.py \
2020-09-05 23:04:25 +01:00
meson-scripts/g-codegen.py \
2019-12-08 05:28:47 +00:00
schemas/meson_install_schemas.py
# Patch pastebin & inxi location
sed "s|/usr/bin/pastebin|$out/bin/pastebin|" -i scripts/upload-system-info
sed "s|'inxi'|'${inxi}/bin/inxi'|" -i scripts/upload-system-info
2021-01-26 20:50:30 +00:00
# Patch gtk3 module target dir
substituteInPlace libxapp/meson.build \
--replace "gtk3_dep.get_pkgconfig_variable('libdir')" "'$out'"
2019-12-08 05:28:47 +00:00
'';
meta = with lib; {
2019-12-08 05:28:47 +00:00
homepage = "https://github.com/linuxmint/xapps";
description = "Cross-desktop libraries and common resources";
license = licenses.lgpl3;
platforms = platforms.linux;
maintainers = teams.cinnamon.members;
2019-12-08 05:28:47 +00:00
};
}