Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

packagekit: add latest from hughsie's github repo

- currently pulled in from Git until the next release of PackageKit
has Nix support
- also: add in a service module to start packagekit properly
- nixos service can be enabled via services.packagekit.enable
- packagekit requires nixunstable to build properly

+104 -43
+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 + }
+39 -42
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
+3 -1
pkgs/top-level/all-packages.nix
··· 2877 2877 2878 2878 p7zip = callPackage ../tools/archivers/p7zip { }; 2879 2879 2880 - packagekit = callPackage ../tools/package-management/packagekit { }; 2880 + packagekit = callPackage ../tools/package-management/packagekit { 2881 + nix = nixUnstable; 2882 + }; 2881 2883 2882 2884 pal = callPackage ../tools/misc/pal { }; 2883 2885