Merge pull request #15848 from matthewbauer/packagekit

Add in PackageKit

Changed files
+261 -64
nixos
modules
services
misc
x11
desktop-managers
pkgs
desktops
gnome-3
3.18
misc
gnome-packagekit
gnome-software
3.20
core
gnome-software
misc
gnome-packagekit
development
libraries
appstream-glib
tools
package-management
packagekit
top-level
+1
nixos/modules/module-list.nix
···
./services/misc/nix-ssh-serve.nix
./services/misc/nzbget.nix
./services/misc/octoprint.nix
+
./services/misc/packagekit.nix
./services/misc/parsoid.nix
./services/misc/phd.nix
./services/misc/plex.nix
+61
nixos/modules/services/misc/packagekit.nix
···
+
{ config, lib, pkgs, ... }:
+
+
with lib;
+
+
let
+
+
cfg = config.services.packagekit;
+
+
backend = "nix";
+
+
packagekitConf = ''
+
[Daemon]
+
DefaultBackend=${backend}
+
KeepCache=false
+
'';
+
+
vendorConf = ''
+
[PackagesNotFound]
+
DefaultUrl=https://github.com/NixOS/nixpkgs
+
CodecUrl=https://github.com/NixOS/nixpkgs
+
HardwareUrl=https://github.com/NixOS/nixpkgs
+
FontUrl=https://github.com/NixOS/nixpkgs
+
MimeUrl=https://github.com/NixOS/nixpkgs
+
'';
+
+
in
+
+
{
+
+
options = {
+
+
services.packagekit = {
+
enable = mkEnableOption
+
''
+
PackageKit provides a cross-platform D-Bus abstraction layer for
+
installing software. Software utilizing PackageKit can install
+
software regardless of the package manager.
+
'';
+
};
+
+
};
+
+
config = mkIf cfg.enable {
+
+
services.dbus.packages = [ pkgs.packagekit ];
+
+
systemd.services.packagekit = {
+
description = "PackageKit Daemon";
+
wantedBy = [ "multi-user.target" ];
+
serviceConfig.ExecStart = "${pkgs.packagekit}/libexec/packagekitd";
+
serviceConfig.User = "root";
+
serviceConfig.BusName = "org.freedesktop.PackageKit";
+
serviceConfig.Type = "dbus";
+
};
+
+
environment.etc."PackageKit/PackageKit.conf".text = packagekitConf;
+
environment.etc."PackageKit/Vendor.conf".text = vendorConf;
+
+
};
+
+
}
+1
nixos/modules/services/x11/desktop-managers/gnome3.nix
···
services.upower.enable = config.powerManagement.enable;
services.dbus.packages = mkIf config.services.printing.enable [ pkgs.system-config-printer ];
services.colord.enable = mkDefault true;
+
services.packagekit.enable = mkDefault true;
hardware.bluetooth.enable = mkDefault true;
services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
+10 -6
pkgs/desktops/gnome-3/3.18/default.nix
···
let
pkgsFun = overrides:
-
let
+
let
self = self_ // overrides;
self_ = with self; {
···
gnome-clocks gnome-music gnome-tweak-tool gnome-photos
nautilus-sendto dconf-editor vinagre gnome-weather gnome-logs
gnome-maps gnome-characters gnome-calendar accerciser gnome-nettool
-
gnome-getting-started-docs
+
gnome-getting-started-docs gnome-software gnome-packagekit
];
gamesPackages = with gnome3; [ swell-foop lightsoff iagno
···
dconf = callPackage ./core/dconf { };
dconf-editor = callPackage ./core/dconf-editor { };
-
empathy = callPackage ./core/empathy {
+
empathy = callPackage ./core/empathy {
webkitgtk = webkitgtk24x;
clutter-gst = pkgs.clutter-gst;
};
···
california = callPackage ./misc/california { };
-
geary = callPackage ./misc/geary {
+
geary = callPackage ./misc/geary {
webkitgtk = webkitgtk24x;
};
gfbgraph = callPackage ./misc/gfbgraph { };
-
gitg = callPackage ./misc/gitg {
+
gitg = callPackage ./misc/gitg {
webkitgtk = webkitgtk24x;
};
···
gpaste = callPackage ./misc/gpaste { };
pidgin-im-gnome-shell-extension = callPackage ./misc/pidgin { };
-
+
gtkhtml = callPackage ./misc/gtkhtml { };
pomodoro = callPackage ./misc/pomodoro { };
gnome-video-effects = callPackage ./misc/gnome-video-effects { };
+
+
gnome-software = callPackage ./misc/gnome-software { };
+
+
gnome-packagekit = callPackage ./misc/gnome-packagekit { };
};
in self; # pkgsFun
+26
pkgs/desktops/gnome-3/3.18/misc/gnome-packagekit/default.nix
···
+
{ stdenv, fetchurl, pkgconfig, intltool, gnome3, libxslt, packagekit
+
, fontconfig, libcanberra_gtk3, libnotify, wrapGAppsHook, dbus_glib, dbus_libs }:
+
+
stdenv.mkDerivation rec {
+
name = "gnome-packagekit-${version}";
+
version = "3.18.0";
+
+
src = fetchurl {
+
url = "mirror://gnome/sources/gnome-packagekit/3.18/${name}.tar.xz";
+
sha256 = "0a7ww807b77yjf6l8s2ycpxx813lyncwaxq227jckphazpq65a50";
+
};
+
+
NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0";
+
+
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+
buildInputs = [ libxslt gnome3.gtk packagekit fontconfig
+
libcanberra_gtk3 libnotify dbus_glib dbus_libs ];
+
+
meta = with stdenv.lib; {
+
homepage = https://www.freedesktop.org/software/PackageKit/;
+
platforms = platforms.linux;
+
maintainers = gnome3.maintainers;
+
license = licenses.gpl2;
+
description = "Tools for installing software on the GNOME desktop using PackageKit";
+
};
+
}
+31
pkgs/desktops/gnome-3/3.18/misc/gnome-software/default.nix
···
+
{ stdenv, fetchurl, pkgconfig, intltool, gnome3, wrapGAppsHook, packagekit
+
, appstream-glib, libsoup, polkit, attr, acl, libyaml, isocodes }:
+
+
stdenv.mkDerivation rec {
+
name = "gnome-software-${version}";
+
version = "3.18.3";
+
+
src = fetchurl {
+
url = "mirror://gnome/sources/gnome-software/3.18/${name}.tar.xz";
+
sha256 = "0ywvjmn0cwr4kv2l6ic80ac7js7hpsp3g127cj7h256iaqgsaxnc";
+
};
+
+
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+
buildInputs = [ gnome3.gtk packagekit appstream-glib libsoup
+
gnome3.gsettings_desktop_schemas gnome3.gnome_desktop
+
polkit attr acl libyaml ];
+
propogatedBuildInputs = [ isocodes ];
+
+
postInstall = ''
+
mkdir -p $out/share/xml/
+
ln -s ${isocodes}/share/xml/iso-codes $out/share/xml/iso-codes
+
'';
+
+
meta = with stdenv.lib; {
+
homepage = https://www.freedesktop.org/software/PackageKit/;
+
platforms = platforms.linux;
+
maintainers = gnome3.maintainers;
+
license = licenses.gpl2;
+
description = "GNOME Software lets you install and update applications and system extensions.";
+
};
+
}
+27
pkgs/desktops/gnome-3/3.20/core/gnome-software/default.nix
···
+
{ stdenv, fetchurl, pkgconfig, intltool, gnome3, wrapGAppsHook, packagekit
+
, appstream-glib, libsoup, polkit, attr, acl, libyaml, isocodes, gtkspell3
+
, json_glib }:
+
+
stdenv.mkDerivation rec {
+
inherit (import ./src.nix fetchurl) name src;
+
+
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+
buildInputs = [ gnome3.gtk packagekit appstream-glib libsoup
+
gnome3.gsettings_desktop_schemas gnome3.gnome_desktop
+
gtkspell3 json_glib
+
polkit attr acl libyaml ];
+
propogatedBuildInputs = [ isocodes ];
+
+
postInstall = ''
+
mkdir -p $out/share/xml/
+
ln -s ${isocodes}/share/xml/iso-codes $out/share/xml/iso-codes
+
'';
+
+
meta = with stdenv.lib; {
+
homepage = https://www.freedesktop.org/software/PackageKit/;
+
platforms = platforms.linux;
+
maintainers = gnome3.maintainers;
+
license = licenses.gpl2;
+
description = "GNOME Software lets you install and update applications and system extensions.";
+
};
+
}
+10
pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix
···
+
# Autogenerated by maintainers/scripts/gnome.sh update
+
+
fetchurl: {
+
name = "gnome-software-3.20.0";
+
+
src = fetchurl {
+
url = mirror://gnome/sources/gnome-software/3.20/gnome-software-3.20.0.tar.xz;
+
sha256 = "0w0bp29fm13a235gq8vylihzjfxx20ri46w4w2syaw0cixxihbix";
+
};
+
}
+8 -4
pkgs/desktops/gnome-3/3.20/default.nix
···
let
pkgsFun = overrides:
-
let
+
let
self = self_ // overrides;
self_ = with self; {
···
gnome-clocks gnome-music gnome-tweak-tool gnome-photos
nautilus-sendto dconf-editor vinagre gnome-weather gnome-logs
gnome-maps gnome-characters gnome-calendar accerciser gnome-nettool
-
gnome-getting-started-docs
+
gnome-getting-started-docs gnome-packagekit gnome-software
];
gamesPackages = with gnome3; [ swell-foop lightsoff iagno
···
gnome-screenshot = callPackage ./core/gnome-screenshot { };
gnome_settings_daemon = callPackage ./core/gnome-settings-daemon { };
+
+
gnome-software = callPackage ./core/gnome-software { };
gnome-system-log = callPackage ./core/gnome-system-log { };
···
california = callPackage ./misc/california { };
-
geary = callPackage ./misc/geary {
+
geary = callPackage ./misc/geary {
webkitgtk = webkitgtk24x;
};
gfbgraph = callPackage ./misc/gfbgraph { };
-
gitg = callPackage ./misc/gitg {
+
gitg = callPackage ./misc/gitg {
webkitgtk = webkitgtk24x;
};
···
pomodoro = callPackage ./misc/pomodoro { };
gnome-video-effects = callPackage ./misc/gnome-video-effects { };
+
+
gnome-packagekit = callPackage ./misc/gnome-packagekit { };
};
in self; # pkgsFun
+20
pkgs/desktops/gnome-3/3.20/misc/gnome-packagekit/default.nix
···
+
{ stdenv, fetchurl, pkgconfig, intltool, gnome3, libxslt, packagekit
+
, fontconfig, libcanberra_gtk3, libnotify, wrapGAppsHook, dbus_glib, dbus_libs }:
+
+
stdenv.mkDerivation rec {
+
inherit (import ./src.nix fetchurl) name src;
+
+
NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0";
+
+
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+
buildInputs = [ libxslt gnome3.gtk packagekit fontconfig
+
libcanberra_gtk3 libnotify dbus_glib dbus_libs ];
+
+
meta = with stdenv.lib; {
+
homepage = https://www.freedesktop.org/software/PackageKit/;
+
platforms = platforms.linux;
+
maintainers = gnome3.maintainers;
+
license = licenses.gpl2;
+
description = "Tools for installing software on the GNOME desktop using PackageKit";
+
};
+
}
+10
pkgs/desktops/gnome-3/3.20/misc/gnome-packagekit/src.nix
···
+
# Autogenerated by maintainers/scripts/gnome.sh update
+
+
fetchurl: {
+
name = "gnome-packagekit-3.20.0";
+
+
src = fetchurl {
+
url = mirror://gnome/sources/gnome-packagekit/3.20/gnome-packagekit-3.20.0.tar.xz;
+
sha256 = "0wf5r0qrdlalbr73fpfaapq61vlya3nwygsv4wm2bxaf56v5sjmq";
+
};
+
}
+13 -10
pkgs/development/libraries/appstream-glib/default.nix
···
-
{ stdenv, fetchurl, pkgconfig, gettext, gtk3, intltool, glib
+
{ stdenv, fetchFromGitHub, pkgconfig, gettext, gtk3, intltool, glib
, gtk_doc, autoconf, automake, libtool, libarchive, libyaml
, gobjectIntrospection, sqlite, libsoup, gcab, attr, acl, docbook_xsl
+
, libuuid, json_glib
}:
stdenv.mkDerivation rec {
-
name = "appstream-glib-0.3.6";
+
name = "appstream-glib-0.5.11";
-
src = fetchurl {
-
url = "https://github.com/hughsie/appstream-glib/archive/appstream_glib_0_3_6.tar.gz";
-
sha256 = "1zdxg9dk9vxw2cs04cswd138di3dysz0hxk4918750hh19s3859c";
+
src = fetchFromGitHub {
+
owner = "hughsie";
+
repo = "appstream-glib";
+
rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
+
sha256 = "1rvfncm9z29h70pd718j73cd263g6yyxkxrg7zfzy0gj6wwzvhkh";
};
-
buildInputs = [ glib libtool pkgconfig gtk_doc gettext intltool sqlite libsoup
-
gcab attr acl docbook_xsl
-
libarchive libyaml gtk3 autoconf automake gobjectIntrospection ];
+
nativeBuildInputs = [ autoconf automake libtool pkgconfig intltool ];
+
buildInputs = [ glib gtk_doc gettext sqlite libsoup
+
gcab attr acl docbook_xsl libuuid json_glib
+
libarchive libyaml gtk3 gobjectIntrospection ];
configureScript = "./autogen.sh";
···
homepage = https://github.com/hughsie/appstream-glib;
license = licenses.lgpl21Plus;
platforms = platforms.linux;
-
maintainers = with maintainers; [ lethalman ];
+
maintainers = with maintainers; [ lethalman matthewbauer ];
};
-
}
+40 -43
pkgs/tools/package-management/packagekit/default.nix
···
-
{ stdenv, fetchurl, intltool, glib, pkgconfig, polkit, python, sqlite }:
+
{ stdenv, fetchFromGitHub, intltool, glib, pkgconfig, polkit, python, sqlite, systemd
+
, gobjectIntrospection, vala, gtk_doc, autoreconfHook, autoconf-archive
+
, nix, boost
+
, enableCommandNotFound ? false
+
, enableBashCompletion ? false, bashCompletion ? null }:
+
+
with stdenv.lib;
stdenv.mkDerivation rec {
-
name = "packagekit-${version}";
-
version = "1.1.1";
+
name = "packagekit-2016-06-03";
-
src = fetchurl {
-
sha256 = "1i6an483vmm6y39szr2alq5vf6kfxhk3j5ca79qrshcj9jjlhcs8";
-
url = "http://www.freedesktop.org/software/PackageKit/releases/PackageKit-${version}.tar.xz";
+
src = fetchFromGitHub {
+
owner = "hughsie";
+
repo = "PackageKit";
+
rev = "99fd83bbb26badf43c6a17a9f0c6dc054c7484c8";
+
sha256 = "0y42vl6r1wh57sbjfkn4khjs78q54wshf4p0v4nly9s7hydxpi6a";
};
-
buildInputs = [ glib polkit python ];
-
propagatedBuildInputs = [ sqlite ];
-
nativeBuildInputs = [ intltool pkgconfig ];
+
buildInputs = [ glib polkit systemd python gobjectIntrospection vala ]
+
++ optional enableBashCompletion bashCompletion;
+
propagatedBuildInputs = [ sqlite nix boost ];
+
nativeBuildInputs = [ intltool pkgconfig autoreconfHook autoconf-archive gtk_doc ];
+
+
preAutoreconf = ''
+
gtkdocize
+
intltoolize
+
'';
configureFlags = [
-
"--disable-static"
-
"--disable-python3"
-
"--disable-networkmanager"
-
"--disable-connman"
-
"--disable-systemd"
-
"--disable-bash-completion"
-
"--disable-gstreamer-plugin"
-
"--disable-gtk-module"
-
"--disable-command-not-found"
+
"--enable-systemd"
+
"--enable-nix"
+
"--disable-dummy"
"--disable-cron"
-
"--disable-daemon-tests"
-
"--disable-alpm"
-
"--disable-aptcc"
-
"--enable-dummy"
-
"--disable-entropy"
-
"--disable-hif"
-
"--disable-pisi"
-
"--disable-poldek"
-
"--disable-portage"
-
"--disable-ports"
-
"--disable-katja"
-
"--disable-urpmi"
-
"--disable-yum"
-
"--disable-zypp"
-
];
+
"--disable-introspection"
+
"--disable-offline-update"
+
"--localstatedir=/var"
+
"--sysconfdir=/etc"
+
"--with-dbus-sys=$(out)/etc/dbus-1/system.d"
+
"--with-systemdsystemunitdir=$(out)/lib/systemd/system/"
+
]
+
++ optional (!enableBashCompletion) "--disable-bash-completion"
+
++ optional (!enableCommandNotFound) "--disable-command-not-found";
enableParallelBuilding = true;
-
preInstall = ''
-
# Don't install anything to e.g. $out/var/cache:
-
for dir in src data; do
-
substituteInPlace $dir/Makefile \
-
--replace " install-data-hook" "" \
-
--replace " install-databaseDATA" ""
-
done
-
'';
+
installFlags = [
+
"sysconfdir=\${out}/etc"
+
"localstatedir=\${TMPDIR}"
+
];
-
meta = with stdenv.lib; {
+
meta = {
description = "System to facilitate installing and updating packages";
longDescription = ''
PackageKit is a system designed to make installing and updating software
···
homepage = http://www.packagekit.org/;
license = licenses.gpl2Plus;
platforms = platforms.linux;
-
maintainers = with maintainers; [ nckx ];
+
maintainers = with maintainers; [ nckx matthewbauer ];
};
}
+3 -1
pkgs/top-level/all-packages.nix
···
p7zip = callPackage ../tools/archivers/p7zip { };
-
packagekit = callPackage ../tools/package-management/packagekit { };
+
packagekit = callPackage ../tools/package-management/packagekit {
+
nix = nixUnstable;
+
};
pal = callPackage ../tools/misc/pal { };