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
This commit is contained in:
parent
dedfc00204
commit
4e50880c82
|
@ -249,6 +249,7 @@
|
||||||
./services/misc/nix-ssh-serve.nix
|
./services/misc/nix-ssh-serve.nix
|
||||||
./services/misc/nzbget.nix
|
./services/misc/nzbget.nix
|
||||||
./services/misc/octoprint.nix
|
./services/misc/octoprint.nix
|
||||||
|
./services/misc/packagekit.nix
|
||||||
./services/misc/parsoid.nix
|
./services/misc/parsoid.nix
|
||||||
./services/misc/phd.nix
|
./services/misc/phd.nix
|
||||||
./services/misc/plex.nix
|
./services/misc/plex.nix
|
||||||
|
|
61
nixos/modules/services/misc/packagekit.nix
Normal file
61
nixos/modules/services/misc/packagekit.nix
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{ 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,57 +1,54 @@
|
||||||
{ 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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "packagekit-${version}";
|
name = "packagekit-2016-06-03";
|
||||||
version = "1.1.1";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
sha256 = "1i6an483vmm6y39szr2alq5vf6kfxhk3j5ca79qrshcj9jjlhcs8";
|
owner = "hughsie";
|
||||||
url = "http://www.freedesktop.org/software/PackageKit/releases/PackageKit-${version}.tar.xz";
|
repo = "PackageKit";
|
||||||
|
rev = "99fd83bbb26badf43c6a17a9f0c6dc054c7484c8";
|
||||||
|
sha256 = "0y42vl6r1wh57sbjfkn4khjs78q54wshf4p0v4nly9s7hydxpi6a";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ glib polkit python ];
|
buildInputs = [ glib polkit systemd python gobjectIntrospection vala ]
|
||||||
propagatedBuildInputs = [ sqlite ];
|
++ optional enableBashCompletion bashCompletion;
|
||||||
nativeBuildInputs = [ intltool pkgconfig ];
|
propagatedBuildInputs = [ sqlite nix boost ];
|
||||||
|
nativeBuildInputs = [ intltool pkgconfig autoreconfHook autoconf-archive gtk_doc ];
|
||||||
|
|
||||||
|
preAutoreconf = ''
|
||||||
|
gtkdocize
|
||||||
|
intltoolize
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--disable-static"
|
"--enable-systemd"
|
||||||
"--disable-python3"
|
"--enable-nix"
|
||||||
"--disable-networkmanager"
|
"--disable-dummy"
|
||||||
"--disable-connman"
|
|
||||||
"--disable-systemd"
|
|
||||||
"--disable-bash-completion"
|
|
||||||
"--disable-gstreamer-plugin"
|
|
||||||
"--disable-gtk-module"
|
|
||||||
"--disable-command-not-found"
|
|
||||||
"--disable-cron"
|
"--disable-cron"
|
||||||
"--disable-daemon-tests"
|
"--disable-introspection"
|
||||||
"--disable-alpm"
|
"--disable-offline-update"
|
||||||
"--disable-aptcc"
|
"--localstatedir=/var"
|
||||||
"--enable-dummy"
|
"--sysconfdir=/etc"
|
||||||
"--disable-entropy"
|
"--with-dbus-sys=$(out)/etc/dbus-1/system.d"
|
||||||
"--disable-hif"
|
"--with-systemdsystemunitdir=$(out)/lib/systemd/system/"
|
||||||
"--disable-pisi"
|
]
|
||||||
"--disable-poldek"
|
++ optional (!enableBashCompletion) "--disable-bash-completion"
|
||||||
"--disable-portage"
|
++ optional (!enableCommandNotFound) "--disable-command-not-found";
|
||||||
"--disable-ports"
|
|
||||||
"--disable-katja"
|
|
||||||
"--disable-urpmi"
|
|
||||||
"--disable-yum"
|
|
||||||
"--disable-zypp"
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
preInstall = ''
|
installFlags = [
|
||||||
# Don't install anything to e.g. $out/var/cache:
|
"sysconfdir=\${out}/etc"
|
||||||
for dir in src data; do
|
"localstatedir=\${TMPDIR}"
|
||||||
substituteInPlace $dir/Makefile \
|
];
|
||||||
--replace " install-data-hook" "" \
|
|
||||||
--replace " install-databaseDATA" ""
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = {
|
||||||
description = "System to facilitate installing and updating packages";
|
description = "System to facilitate installing and updating packages";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
PackageKit is a system designed to make installing and updating software
|
PackageKit is a system designed to make installing and updating software
|
||||||
|
|
|
@ -2877,7 +2877,9 @@ in
|
||||||
|
|
||||||
p7zip = callPackage ../tools/archivers/p7zip { };
|
p7zip = callPackage ../tools/archivers/p7zip { };
|
||||||
|
|
||||||
packagekit = callPackage ../tools/package-management/packagekit { };
|
packagekit = callPackage ../tools/package-management/packagekit {
|
||||||
|
nix = nixUnstable;
|
||||||
|
};
|
||||||
|
|
||||||
pal = callPackage ../tools/misc/pal { };
|
pal = callPackage ../tools/misc/pal { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue