2022-02-10 20:34:41 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, gettext
|
|
|
|
, glib
|
|
|
|
, pkg-config
|
|
|
|
, polkit
|
|
|
|
, python3
|
|
|
|
, sqlite
|
|
|
|
, gobject-introspection
|
|
|
|
, vala
|
|
|
|
, gtk-doc
|
|
|
|
, boost
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, libxslt
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_42
|
|
|
|
, libxml2
|
|
|
|
, gst_all_1
|
|
|
|
, gtk3
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableCommandNotFound ? false
|
2022-02-10 20:34:41 +00:00
|
|
|
, enableBashCompletion ? false
|
|
|
|
, bash-completion ? null
|
|
|
|
, enableSystemd ? stdenv.isLinux
|
|
|
|
, systemd
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "packagekit";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "1.2.5.1pre";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-02-10 20:34:41 +00:00
|
|
|
owner = "PackageKit";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "PackageKit";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "30bb82da8d4161330a6d7a20c9989149303421a1";
|
|
|
|
sha256 = "k2osc2v0OuGrNjwxdqn785RsbHEJP3p79PG9YqnVE3U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
polkit
|
|
|
|
python3
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gtk3
|
|
|
|
sqlite
|
|
|
|
boost
|
|
|
|
] ++ lib.optional enableSystemd systemd
|
|
|
|
++ lib.optional enableBashCompletion bash-completion;
|
|
|
|
nativeBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
gobject-introspection
|
|
|
|
glib
|
2022-02-10 20:34:41 +00:00
|
|
|
vala
|
|
|
|
gettext
|
|
|
|
pkg-config
|
|
|
|
gtk-doc
|
|
|
|
meson
|
|
|
|
libxslt
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_42
|
|
|
|
libxml2
|
|
|
|
ninja
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(if enableSystemd then "-Dsystemd=true" else "-Dsystem=false")
|
2023-01-11 07:51:40 +00:00
|
|
|
# often fails to build with nix updates
|
|
|
|
# and remounts /nix/store as rw
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/177946
|
|
|
|
#"-Dpackaging_backend=nix"
|
2022-02-10 20:34:41 +00:00
|
|
|
"-Ddbus_sys=${placeholder "out"}/share/dbus-1/system.d"
|
|
|
|
"-Ddbus_services=${placeholder "out"}/share/dbus-1/system-services"
|
|
|
|
"-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
|
|
"-Dcron=false"
|
|
|
|
"-Dgtk_doc=true"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--sysconfdir=/etc"
|
2022-02-10 20:34:41 +00:00
|
|
|
"--localstatedir=/var"
|
2020-04-24 23:36:52 +00:00
|
|
|
]
|
2022-02-10 20:34:41 +00:00
|
|
|
++ lib.optional (!enableBashCompletion) "-Dbash_completion=false"
|
|
|
|
++ lib.optional (!enableCommandNotFound) "-Dbash_command_not_found=false";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
# HACK: we want packagekit to look in /etc for configs but install
|
|
|
|
# those files in $out/etc ; we just override the runtime paths here
|
|
|
|
# same for /var & $out/var
|
|
|
|
substituteInPlace etc/meson.build \
|
|
|
|
--replace "install_dir: join_paths(get_option('sysconfdir'), 'PackageKit')" "install_dir: join_paths('$out', 'etc', 'PackageKit')"
|
|
|
|
substituteInPlace data/meson.build \
|
|
|
|
--replace "install_dir: join_paths(get_option('localstatedir'), 'lib', 'PackageKit')," "install_dir: join_paths('$out', 'var', 'lib', 'PackageKit'),"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "System to facilitate installing and updating packages";
|
|
|
|
longDescription = ''
|
|
|
|
PackageKit is a system designed to make installing and updating software
|
|
|
|
on your computer easier. The primary design goal is to unify all the
|
|
|
|
software graphical tools used in different distributions, and use some of
|
|
|
|
the latest technology like PolicyKit. The actual nuts-and-bolts distro
|
|
|
|
tool (dnf, apt, etc) is used by PackageKit using compiled and scripted
|
|
|
|
helpers. PackageKit isn't meant to replace these tools, instead providing
|
|
|
|
a common set of abstractions that can be used by standard GUI and text
|
|
|
|
mode package managers.
|
|
|
|
'';
|
2022-12-28 21:21:41 +00:00
|
|
|
homepage = "https://github.com/PackageKit/PackageKit";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|