nixpkgs/pkgs/tools/package-management/packagekit/default.nix

74 lines
2.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, lib
2019-12-25 09:29:57 +01:00
, intltool, glib, pkgconfig, polkit, python3, sqlite
2019-03-14 05:18:41 +01:00
, gobject-introspection, vala, gtk-doc, autoreconfHook, autoconf-archive
# TODO: set enableNixBackend to true, as soon as it builds
, nix, enableNixBackend ? false, boost
, enableCommandNotFound ? false
, enableBashCompletion ? false, bash-completion ? null
, enableSystemd ? stdenv.isLinux, systemd }:
stdenv.mkDerivation rec {
pname = "packagekit";
2018-12-03 20:29:45 +01:00
version = "1.1.12";
2018-09-23 14:25:43 +02:00
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "hughsie";
repo = "PackageKit";
rev = "PACKAGEKIT_${lib.replaceStrings ["."] ["_"] version}";
2018-12-03 20:29:45 +01:00
sha256 = "02wq3jw3mkdld90irh5vdfd5bri2g1p89mhrmj56kvif1fqak46x";
};
2019-12-25 09:29:57 +01:00
buildInputs = [ glib polkit python3 gobject-introspection ]
++ lib.optional enableSystemd systemd
++ lib.optional enableBashCompletion bash-completion;
propagatedBuildInputs = [ sqlite nix boost ];
nativeBuildInputs = [ vala intltool pkgconfig autoreconfHook autoconf-archive gtk-doc ];
preAutoreconf = ''
gtkdocize
intltoolize
'';
configureFlags = [
(if enableSystemd then "--enable-systemd" else "--disable-systemd")
"--disable-dummy"
"--disable-cron"
2018-09-23 14:25:43 +02:00
"--enable-introspection"
"--disable-offline-update"
"--localstatedir=/var"
"--sysconfdir=/etc"
"--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d"
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system/"
]
++ lib.optional enableNixBackend "--enable-nix"
++ lib.optional (!enableBashCompletion) "--disable-bash-completion"
++ lib.optional (!enableCommandNotFound) "--disable-command-not-found";
enableParallelBuilding = true;
installFlags = [
"sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}"
];
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.
'';
homepage = http://www.packagekit.org/;
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ matthewbauer ];
};
}