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/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
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 {
|
||||
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
|
||||
|
@ -2877,7 +2877,9 @@ in
|
||||
|
||||
p7zip = callPackage ../tools/archivers/p7zip { };
|
||||
|
||||
packagekit = callPackage ../tools/package-management/packagekit { };
|
||||
packagekit = callPackage ../tools/package-management/packagekit {
|
||||
nix = nixUnstable;
|
||||
};
|
||||
|
||||
pal = callPackage ../tools/misc/pal { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user