nixpkgs/pkgs/development/libraries/libpeas/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

92 lines
1.7 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ stdenv
, lib
, fetchurl
, substituteAll
, meson
, ninja
, pkg-config
, gettext
, gi-docgen
, gnome
, glib
, gtk3
, gobject-introspection
, python3
, ncurses
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "libpeas";
version = "1.36.0";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "KXy5wszNjoYXYj0aPoQVtFMLjlqJPjUnu/0e3RMje0w=";
};
patches = [
# Make PyGObjects gi library available.
(substituteAll {
src = ./fix-paths.patch;
pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
python3.pkgs.pygobject3
];
})
];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
pkg-config
meson
ninja
gettext
gi-docgen
gobject-introspection
wrapGAppsHook
];
buildInputs = [
glib
gtk3
ncurses
python3
python3.pkgs.pygobject3
];
propagatedBuildInputs = [
# Required by libpeas-1.0.pc
gobject-introspection
];
mesonFlags = [
"-Dgtk_doc=true"
];
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
freeze = true;
};
};
meta = with lib; {
description = "A GObject-based plugins engine";
mainProgram = "peas-demo";
homepage = "https://wiki.gnome.org/Projects/Libpeas";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = teams.gnome.members;
};
}