Merge pull request #15848 from matthewbauer/packagekit

Add in PackageKit

authored by

Joachim F and committed by
GitHub
ed50ef31 8f43f111

+261 -64
+1
nixos/modules/module-list.nix
··· 249 249 ./services/misc/nix-ssh-serve.nix 250 250 ./services/misc/nzbget.nix 251 251 ./services/misc/octoprint.nix 252 + ./services/misc/packagekit.nix 252 253 ./services/misc/parsoid.nix 253 254 ./services/misc/phd.nix 254 255 ./services/misc/plex.nix
+61
nixos/modules/services/misc/packagekit.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + 7 + cfg = config.services.packagekit; 8 + 9 + backend = "nix"; 10 + 11 + packagekitConf = '' 12 + [Daemon] 13 + DefaultBackend=${backend} 14 + KeepCache=false 15 + ''; 16 + 17 + vendorConf = '' 18 + [PackagesNotFound] 19 + DefaultUrl=https://github.com/NixOS/nixpkgs 20 + CodecUrl=https://github.com/NixOS/nixpkgs 21 + HardwareUrl=https://github.com/NixOS/nixpkgs 22 + FontUrl=https://github.com/NixOS/nixpkgs 23 + MimeUrl=https://github.com/NixOS/nixpkgs 24 + ''; 25 + 26 + in 27 + 28 + { 29 + 30 + options = { 31 + 32 + services.packagekit = { 33 + enable = mkEnableOption 34 + '' 35 + PackageKit provides a cross-platform D-Bus abstraction layer for 36 + installing software. Software utilizing PackageKit can install 37 + software regardless of the package manager. 38 + ''; 39 + }; 40 + 41 + }; 42 + 43 + config = mkIf cfg.enable { 44 + 45 + services.dbus.packages = [ pkgs.packagekit ]; 46 + 47 + systemd.services.packagekit = { 48 + description = "PackageKit Daemon"; 49 + wantedBy = [ "multi-user.target" ]; 50 + serviceConfig.ExecStart = "${pkgs.packagekit}/libexec/packagekitd"; 51 + serviceConfig.User = "root"; 52 + serviceConfig.BusName = "org.freedesktop.PackageKit"; 53 + serviceConfig.Type = "dbus"; 54 + }; 55 + 56 + environment.etc."PackageKit/PackageKit.conf".text = packagekitConf; 57 + environment.etc."PackageKit/Vendor.conf".text = vendorConf; 58 + 59 + }; 60 + 61 + }
+1
nixos/modules/services/x11/desktop-managers/gnome3.nix
··· 121 121 services.upower.enable = config.powerManagement.enable; 122 122 services.dbus.packages = mkIf config.services.printing.enable [ pkgs.system-config-printer ]; 123 123 services.colord.enable = mkDefault true; 124 + services.packagekit.enable = mkDefault true; 124 125 hardware.bluetooth.enable = mkDefault true; 125 126 services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center 126 127
+10 -6
pkgs/desktops/gnome-3/3.18/default.nix
··· 3 3 let 4 4 5 5 pkgsFun = overrides: 6 - let 6 + let 7 7 self = self_ // overrides; 8 8 self_ = with self; { 9 9 ··· 35 35 gnome-clocks gnome-music gnome-tweak-tool gnome-photos 36 36 nautilus-sendto dconf-editor vinagre gnome-weather gnome-logs 37 37 gnome-maps gnome-characters gnome-calendar accerciser gnome-nettool 38 - gnome-getting-started-docs 38 + gnome-getting-started-docs gnome-software gnome-packagekit 39 39 ]; 40 40 41 41 gamesPackages = with gnome3; [ swell-foop lightsoff iagno ··· 79 79 dconf = callPackage ./core/dconf { }; 80 80 dconf-editor = callPackage ./core/dconf-editor { }; 81 81 82 - empathy = callPackage ./core/empathy { 82 + empathy = callPackage ./core/empathy { 83 83 webkitgtk = webkitgtk24x; 84 84 clutter-gst = pkgs.clutter-gst; 85 85 }; ··· 360 360 361 361 california = callPackage ./misc/california { }; 362 362 363 - geary = callPackage ./misc/geary { 363 + geary = callPackage ./misc/geary { 364 364 webkitgtk = webkitgtk24x; 365 365 }; 366 366 367 367 gfbgraph = callPackage ./misc/gfbgraph { }; 368 368 369 - gitg = callPackage ./misc/gitg { 369 + gitg = callPackage ./misc/gitg { 370 370 webkitgtk = webkitgtk24x; 371 371 }; 372 372 ··· 383 383 gpaste = callPackage ./misc/gpaste { }; 384 384 385 385 pidgin-im-gnome-shell-extension = callPackage ./misc/pidgin { }; 386 - 386 + 387 387 gtkhtml = callPackage ./misc/gtkhtml { }; 388 388 389 389 pomodoro = callPackage ./misc/pomodoro { }; 390 390 391 391 gnome-video-effects = callPackage ./misc/gnome-video-effects { }; 392 + 393 + gnome-software = callPackage ./misc/gnome-software { }; 394 + 395 + gnome-packagekit = callPackage ./misc/gnome-packagekit { }; 392 396 393 397 }; 394 398 in self; # pkgsFun
+26
pkgs/desktops/gnome-3/3.18/misc/gnome-packagekit/default.nix
··· 1 + { stdenv, fetchurl, pkgconfig, intltool, gnome3, libxslt, packagekit 2 + , fontconfig, libcanberra_gtk3, libnotify, wrapGAppsHook, dbus_glib, dbus_libs }: 3 + 4 + stdenv.mkDerivation rec { 5 + name = "gnome-packagekit-${version}"; 6 + version = "3.18.0"; 7 + 8 + src = fetchurl { 9 + url = "mirror://gnome/sources/gnome-packagekit/3.18/${name}.tar.xz"; 10 + sha256 = "0a7ww807b77yjf6l8s2ycpxx813lyncwaxq227jckphazpq65a50"; 11 + }; 12 + 13 + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; 14 + 15 + nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ]; 16 + buildInputs = [ libxslt gnome3.gtk packagekit fontconfig 17 + libcanberra_gtk3 libnotify dbus_glib dbus_libs ]; 18 + 19 + meta = with stdenv.lib; { 20 + homepage = https://www.freedesktop.org/software/PackageKit/; 21 + platforms = platforms.linux; 22 + maintainers = gnome3.maintainers; 23 + license = licenses.gpl2; 24 + description = "Tools for installing software on the GNOME desktop using PackageKit"; 25 + }; 26 + }
+31
pkgs/desktops/gnome-3/3.18/misc/gnome-software/default.nix
··· 1 + { stdenv, fetchurl, pkgconfig, intltool, gnome3, wrapGAppsHook, packagekit 2 + , appstream-glib, libsoup, polkit, attr, acl, libyaml, isocodes }: 3 + 4 + stdenv.mkDerivation rec { 5 + name = "gnome-software-${version}"; 6 + version = "3.18.3"; 7 + 8 + src = fetchurl { 9 + url = "mirror://gnome/sources/gnome-software/3.18/${name}.tar.xz"; 10 + sha256 = "0ywvjmn0cwr4kv2l6ic80ac7js7hpsp3g127cj7h256iaqgsaxnc"; 11 + }; 12 + 13 + nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ]; 14 + buildInputs = [ gnome3.gtk packagekit appstream-glib libsoup 15 + gnome3.gsettings_desktop_schemas gnome3.gnome_desktop 16 + polkit attr acl libyaml ]; 17 + propogatedBuildInputs = [ isocodes ]; 18 + 19 + postInstall = '' 20 + mkdir -p $out/share/xml/ 21 + ln -s ${isocodes}/share/xml/iso-codes $out/share/xml/iso-codes 22 + ''; 23 + 24 + meta = with stdenv.lib; { 25 + homepage = https://www.freedesktop.org/software/PackageKit/; 26 + platforms = platforms.linux; 27 + maintainers = gnome3.maintainers; 28 + license = licenses.gpl2; 29 + description = "GNOME Software lets you install and update applications and system extensions."; 30 + }; 31 + }
+27
pkgs/desktops/gnome-3/3.20/core/gnome-software/default.nix
··· 1 + { stdenv, fetchurl, pkgconfig, intltool, gnome3, wrapGAppsHook, packagekit 2 + , appstream-glib, libsoup, polkit, attr, acl, libyaml, isocodes, gtkspell3 3 + , json_glib }: 4 + 5 + stdenv.mkDerivation rec { 6 + inherit (import ./src.nix fetchurl) name src; 7 + 8 + nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ]; 9 + buildInputs = [ gnome3.gtk packagekit appstream-glib libsoup 10 + gnome3.gsettings_desktop_schemas gnome3.gnome_desktop 11 + gtkspell3 json_glib 12 + polkit attr acl libyaml ]; 13 + propogatedBuildInputs = [ isocodes ]; 14 + 15 + postInstall = '' 16 + mkdir -p $out/share/xml/ 17 + ln -s ${isocodes}/share/xml/iso-codes $out/share/xml/iso-codes 18 + ''; 19 + 20 + meta = with stdenv.lib; { 21 + homepage = https://www.freedesktop.org/software/PackageKit/; 22 + platforms = platforms.linux; 23 + maintainers = gnome3.maintainers; 24 + license = licenses.gpl2; 25 + description = "GNOME Software lets you install and update applications and system extensions."; 26 + }; 27 + }
+10
pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix
··· 1 + # Autogenerated by maintainers/scripts/gnome.sh update 2 + 3 + fetchurl: { 4 + name = "gnome-software-3.20.0"; 5 + 6 + src = fetchurl { 7 + url = mirror://gnome/sources/gnome-software/3.20/gnome-software-3.20.0.tar.xz; 8 + sha256 = "0w0bp29fm13a235gq8vylihzjfxx20ri46w4w2syaw0cixxihbix"; 9 + }; 10 + }
+8 -4
pkgs/desktops/gnome-3/3.20/default.nix
··· 3 3 let 4 4 5 5 pkgsFun = overrides: 6 - let 6 + let 7 7 self = self_ // overrides; 8 8 self_ = with self; { 9 9 ··· 35 35 gnome-clocks gnome-music gnome-tweak-tool gnome-photos 36 36 nautilus-sendto dconf-editor vinagre gnome-weather gnome-logs 37 37 gnome-maps gnome-characters gnome-calendar accerciser gnome-nettool 38 - gnome-getting-started-docs 38 + gnome-getting-started-docs gnome-packagekit gnome-software 39 39 ]; 40 40 41 41 gamesPackages = with gnome3; [ swell-foop lightsoff iagno ··· 148 148 gnome-screenshot = callPackage ./core/gnome-screenshot { }; 149 149 150 150 gnome_settings_daemon = callPackage ./core/gnome-settings-daemon { }; 151 + 152 + gnome-software = callPackage ./core/gnome-software { }; 151 153 152 154 gnome-system-log = callPackage ./core/gnome-system-log { }; 153 155 ··· 359 361 360 362 california = callPackage ./misc/california { }; 361 363 362 - geary = callPackage ./misc/geary { 364 + geary = callPackage ./misc/geary { 363 365 webkitgtk = webkitgtk24x; 364 366 }; 365 367 366 368 gfbgraph = callPackage ./misc/gfbgraph { }; 367 369 368 - gitg = callPackage ./misc/gitg { 370 + gitg = callPackage ./misc/gitg { 369 371 webkitgtk = webkitgtk24x; 370 372 }; 371 373 ··· 392 394 pomodoro = callPackage ./misc/pomodoro { }; 393 395 394 396 gnome-video-effects = callPackage ./misc/gnome-video-effects { }; 397 + 398 + gnome-packagekit = callPackage ./misc/gnome-packagekit { }; 395 399 396 400 }; 397 401 in self; # pkgsFun
+20
pkgs/desktops/gnome-3/3.20/misc/gnome-packagekit/default.nix
··· 1 + { stdenv, fetchurl, pkgconfig, intltool, gnome3, libxslt, packagekit 2 + , fontconfig, libcanberra_gtk3, libnotify, wrapGAppsHook, dbus_glib, dbus_libs }: 3 + 4 + stdenv.mkDerivation rec { 5 + inherit (import ./src.nix fetchurl) name src; 6 + 7 + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; 8 + 9 + nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ]; 10 + buildInputs = [ libxslt gnome3.gtk packagekit fontconfig 11 + libcanberra_gtk3 libnotify dbus_glib dbus_libs ]; 12 + 13 + meta = with stdenv.lib; { 14 + homepage = https://www.freedesktop.org/software/PackageKit/; 15 + platforms = platforms.linux; 16 + maintainers = gnome3.maintainers; 17 + license = licenses.gpl2; 18 + description = "Tools for installing software on the GNOME desktop using PackageKit"; 19 + }; 20 + }
+10
pkgs/desktops/gnome-3/3.20/misc/gnome-packagekit/src.nix
··· 1 + # Autogenerated by maintainers/scripts/gnome.sh update 2 + 3 + fetchurl: { 4 + name = "gnome-packagekit-3.20.0"; 5 + 6 + src = fetchurl { 7 + url = mirror://gnome/sources/gnome-packagekit/3.20/gnome-packagekit-3.20.0.tar.xz; 8 + sha256 = "0wf5r0qrdlalbr73fpfaapq61vlya3nwygsv4wm2bxaf56v5sjmq"; 9 + }; 10 + }
+13 -10
pkgs/development/libraries/appstream-glib/default.nix
··· 1 - { stdenv, fetchurl, pkgconfig, gettext, gtk3, intltool, glib 1 + { stdenv, fetchFromGitHub, pkgconfig, gettext, gtk3, intltool, glib 2 2 , gtk_doc, autoconf, automake, libtool, libarchive, libyaml 3 3 , gobjectIntrospection, sqlite, libsoup, gcab, attr, acl, docbook_xsl 4 + , libuuid, json_glib 4 5 }: 5 6 6 7 stdenv.mkDerivation rec { 7 - name = "appstream-glib-0.3.6"; 8 + name = "appstream-glib-0.5.11"; 8 9 9 - src = fetchurl { 10 - url = "https://github.com/hughsie/appstream-glib/archive/appstream_glib_0_3_6.tar.gz"; 11 - sha256 = "1zdxg9dk9vxw2cs04cswd138di3dysz0hxk4918750hh19s3859c"; 10 + src = fetchFromGitHub { 11 + owner = "hughsie"; 12 + repo = "appstream-glib"; 13 + rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name; 14 + sha256 = "1rvfncm9z29h70pd718j73cd263g6yyxkxrg7zfzy0gj6wwzvhkh"; 12 15 }; 13 16 14 - buildInputs = [ glib libtool pkgconfig gtk_doc gettext intltool sqlite libsoup 15 - gcab attr acl docbook_xsl 16 - libarchive libyaml gtk3 autoconf automake gobjectIntrospection ]; 17 + nativeBuildInputs = [ autoconf automake libtool pkgconfig intltool ]; 18 + buildInputs = [ glib gtk_doc gettext sqlite libsoup 19 + gcab attr acl docbook_xsl libuuid json_glib 20 + libarchive libyaml gtk3 gobjectIntrospection ]; 17 21 18 22 configureScript = "./autogen.sh"; 19 23 ··· 22 26 homepage = https://github.com/hughsie/appstream-glib; 23 27 license = licenses.lgpl21Plus; 24 28 platforms = platforms.linux; 25 - maintainers = with maintainers; [ lethalman ]; 29 + maintainers = with maintainers; [ lethalman matthewbauer ]; 26 30 }; 27 - 28 31 }
+40 -43
pkgs/tools/package-management/packagekit/default.nix
··· 1 - { stdenv, fetchurl, intltool, glib, pkgconfig, polkit, python, sqlite }: 1 + { stdenv, fetchFromGitHub, intltool, glib, pkgconfig, polkit, python, sqlite, systemd 2 + , gobjectIntrospection, vala, gtk_doc, autoreconfHook, autoconf-archive 3 + , nix, boost 4 + , enableCommandNotFound ? false 5 + , enableBashCompletion ? false, bashCompletion ? null }: 6 + 7 + with stdenv.lib; 2 8 3 9 stdenv.mkDerivation rec { 4 - name = "packagekit-${version}"; 5 - version = "1.1.1"; 10 + name = "packagekit-2016-06-03"; 6 11 7 - src = fetchurl { 8 - sha256 = "1i6an483vmm6y39szr2alq5vf6kfxhk3j5ca79qrshcj9jjlhcs8"; 9 - url = "http://www.freedesktop.org/software/PackageKit/releases/PackageKit-${version}.tar.xz"; 12 + src = fetchFromGitHub { 13 + owner = "hughsie"; 14 + repo = "PackageKit"; 15 + rev = "99fd83bbb26badf43c6a17a9f0c6dc054c7484c8"; 16 + sha256 = "0y42vl6r1wh57sbjfkn4khjs78q54wshf4p0v4nly9s7hydxpi6a"; 10 17 }; 11 18 12 - buildInputs = [ glib polkit python ]; 13 - propagatedBuildInputs = [ sqlite ]; 14 - nativeBuildInputs = [ intltool pkgconfig ]; 19 + buildInputs = [ glib polkit systemd python gobjectIntrospection vala ] 20 + ++ optional enableBashCompletion bashCompletion; 21 + propagatedBuildInputs = [ sqlite nix boost ]; 22 + nativeBuildInputs = [ intltool pkgconfig autoreconfHook autoconf-archive gtk_doc ]; 23 + 24 + preAutoreconf = '' 25 + gtkdocize 26 + intltoolize 27 + ''; 15 28 16 29 configureFlags = [ 17 - "--disable-static" 18 - "--disable-python3" 19 - "--disable-networkmanager" 20 - "--disable-connman" 21 - "--disable-systemd" 22 - "--disable-bash-completion" 23 - "--disable-gstreamer-plugin" 24 - "--disable-gtk-module" 25 - "--disable-command-not-found" 30 + "--enable-systemd" 31 + "--enable-nix" 32 + "--disable-dummy" 26 33 "--disable-cron" 27 - "--disable-daemon-tests" 28 - "--disable-alpm" 29 - "--disable-aptcc" 30 - "--enable-dummy" 31 - "--disable-entropy" 32 - "--disable-hif" 33 - "--disable-pisi" 34 - "--disable-poldek" 35 - "--disable-portage" 36 - "--disable-ports" 37 - "--disable-katja" 38 - "--disable-urpmi" 39 - "--disable-yum" 40 - "--disable-zypp" 41 - ]; 34 + "--disable-introspection" 35 + "--disable-offline-update" 36 + "--localstatedir=/var" 37 + "--sysconfdir=/etc" 38 + "--with-dbus-sys=$(out)/etc/dbus-1/system.d" 39 + "--with-systemdsystemunitdir=$(out)/lib/systemd/system/" 40 + ] 41 + ++ optional (!enableBashCompletion) "--disable-bash-completion" 42 + ++ optional (!enableCommandNotFound) "--disable-command-not-found"; 42 43 43 44 enableParallelBuilding = true; 44 45 45 - preInstall = '' 46 - # Don't install anything to e.g. $out/var/cache: 47 - for dir in src data; do 48 - substituteInPlace $dir/Makefile \ 49 - --replace " install-data-hook" "" \ 50 - --replace " install-databaseDATA" "" 51 - done 52 - ''; 46 + installFlags = [ 47 + "sysconfdir=\${out}/etc" 48 + "localstatedir=\${TMPDIR}" 49 + ]; 53 50 54 - meta = with stdenv.lib; { 51 + meta = { 55 52 description = "System to facilitate installing and updating packages"; 56 53 longDescription = '' 57 54 PackageKit is a system designed to make installing and updating software ··· 66 63 homepage = http://www.packagekit.org/; 67 64 license = licenses.gpl2Plus; 68 65 platforms = platforms.linux; 69 - maintainers = with maintainers; [ nckx ]; 66 + maintainers = with maintainers; [ nckx matthewbauer ]; 70 67 }; 71 68 }
+3 -1
pkgs/top-level/all-packages.nix
··· 2896 2896 2897 2897 p7zip = callPackage ../tools/archivers/p7zip { }; 2898 2898 2899 - packagekit = callPackage ../tools/package-management/packagekit { }; 2899 + packagekit = callPackage ../tools/package-management/packagekit { 2900 + nix = nixUnstable; 2901 + }; 2900 2902 2901 2903 pal = callPackage ../tools/misc/pal { }; 2902 2904