ce641f4048
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
100 lines
2 KiB
Nix
100 lines
2 KiB
Nix
{ fetchFromGitHub
|
|
, glib
|
|
, gobject-introspection
|
|
, gtk3
|
|
, libgnomekbd
|
|
, gdk-pixbuf
|
|
, cairo
|
|
, xorg
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, python3
|
|
, lib
|
|
, stdenv
|
|
, vala
|
|
, wrapGAppsHook
|
|
, inxi
|
|
, mate
|
|
, dbus
|
|
, libdbusmenu-gtk3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "xapps";
|
|
version = "2.2.5";
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "linuxmint";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-Ev+gTl9jY1HLbXKnCsVVSsY8ZrHyzsIkp+JTaXOTm6I=";
|
|
};
|
|
|
|
# TODO: https://github.com/NixOS/nixpkgs/issues/36468
|
|
NIX_CFLAGS_COMPILE = [
|
|
"-I${glib.dev}/include/gio-unix-2.0"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
python3
|
|
vala
|
|
wrapGAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
gobject-introspection
|
|
(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
|
|
dbus
|
|
libdbusmenu-gtk3
|
|
];
|
|
|
|
# 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 \
|
|
meson-scripts/g-codegen.py \
|
|
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
|
|
|
|
# Patch gtk3 module target dir
|
|
substituteInPlace libxapp/meson.build \
|
|
--replace "gtk3_dep.get_pkgconfig_variable('libdir')" "'$out'"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/linuxmint/xapps";
|
|
description = "Cross-desktop libraries and common resources";
|
|
license = licenses.lgpl3;
|
|
platforms = platforms.linux;
|
|
maintainers = teams.cinnamon.members;
|
|
};
|
|
}
|