nixpkgs/pkgs/by-name/xa/xapp/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

107 lines
2.2 KiB
Nix

{
fetchFromGitHub,
glib,
gobject-introspection,
gtk3,
libgnomekbd,
gdk-pixbuf,
cairo,
xorg,
meson,
ninja,
pkg-config,
python3,
lib,
stdenv,
vala,
wrapGAppsHook3,
file,
inxi,
mate,
dbus,
libdbusmenu-gtk3,
}:
stdenv.mkDerivation rec {
pname = "xapp";
version = "2.8.7";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
rev = version;
hash = "sha256-PMTsaY04rML2vmVIOWArYqWmGvpTtA1DpFw3ZAtu+oU=";
};
# Recommended by upstream, which enables the build of xapp-debug.
# https://github.com/linuxmint/xapp/issues/169#issuecomment-1574962071
mesonBuildType = "debugoptimized";
nativeBuildInputs = [
meson
ninja
pkg-config
python3
vala
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
(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 schemas/meson_install_schemas.py
# Used in cinnamon-settings
substituteInPlace scripts/upload-system-info \
--replace-fail "'/usr/bin/pastebin'" "'$out/bin/pastebin'" \
--replace-fail "'inxi'" "'${inxi}/bin/inxi'"
# Used in x-d-p-xapp
substituteInPlace scripts/xfce4-set-wallpaper \
--replace-fail "file --mime-type" "${file}/bin/file --mime-type"
'';
# Fix gtk3 module target dir. Proper upstream solution should be using define_variable.
env.PKG_CONFIG_GTK__3_0_LIBDIR = "${placeholder "out"}/lib";
meta = with lib; {
homepage = "https://github.com/linuxmint/xapp";
description = "Cross-desktop libraries and common resources";
license = licenses.lgpl3;
platforms = platforms.linux;
maintainers = teams.cinnamon.members;
};
}