;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages polkit) #:use-module ((guix licenses) #:select (lgpl2.0+)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages xml)) (define-public polkit (package (name "polkit") (version "0.113") (source (origin (method url-fetch) (uri (string-append "https://www.freedesktop.org/software/polkit/releases/" name "-" version ".tar.gz")) (sha256 (base32 "109w86kfqrgz83g9ivggplmgc77rz8kx8646izvm2jb57h4rbh71")) (patches (search-patches "polkit-drop-test.patch")) (modules '((guix build utils))) (snippet '(begin (use-modules (guix build utils)) (substitute* "configure" ;; Replace libsystemd-login with libelogind. (("libsystemd-login") "libelogind") ;; Skip the sanity check that the current system runs ;; systemd. (("test ! -d /sys/fs/cgroup/systemd/") "false")) (substitute* "src/polkit/polkitunixsession-systemd.c" (("systemd") "elogind")) (substitute* "src/polkitbackend/polkitbackendsessionmonitor-systemd.c" (("systemd") "elogind")) (substitute* "src/polkitbackend/polkitbackendjsauthority.c" (("systemd") "elogind")) ;; GuixSD's polkit service stores actions under ;; /etc/polkit-1/actions. (substitute* "src/polkitbackend/polkitbackendinteractiveauthority.c" (("PACKAGE_DATA_DIR \"/polkit-1/actions\"") "PACKAGE_SYSCONF_DIR \"/polkit-1/actions\"")) ;; Set the setuid helper's real location. (substitute* "src/polkitagent/polkitagentsession.c" (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"") "\"/run/setuid-programs/polkit-agent-helper-1\"")))))) (build-system gnu-build-system) (inputs `(("expat" ,expat) ("linux-pam" ,linux-pam) ("elogind" ,elogind) ("mozjs" ,mozjs) ("nspr" ,nspr))) (propagated-inputs `(("glib" ,glib))) ; required by polkit-gobject-1.pc (native-inputs `(("pkg-config" ,pkg-config) ("glib:bin" ,glib "bin") ; for glib-mkenums ("intltool" ,intltool) ("gobject-introspection" ,gobject-introspection))) (arguments `(#:configure-flags '("--sysconfdir=/etc" "--enable-man-pages") #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-introspection-install-dir (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* (find-files "." "Makefile.in") (("@INTROSPECTION_GIRDIR@") (string-append out "/share/gir-1.0/"))2017-01-06Merge branch 'master' into core-updatesLeo Famulari 2017-01-04gnu: linux-libre: Adjust for PowerPC....Carlos Sánchez de La Lama 2017-01-03gnu: Use hurd-triplet? to check if GNU/Hurd....Manolis Ragkousis 2016-12-07gnu: cross-base: Move phases to (gnu build cross-toolchain)....Ludovic Courtès 2016-12-07gnu: cross-base: Factorize list of cross environment variables....Ludovic Courtès 2016-12-07gnu: cross-kernel-headers: Remove propagated-inputs from xhurd-headers....Manolis Ragkousis 2016-12-07gnu: cross-base: Add i686-w64-mingw32 target....Jan Nieuwenhuizen 2016-11-06Merge branch 'master' into core-updatesMark H Weaver 2016-11-04gnu: cross-base: Remove exports of cross compilers....Ludovic Courtès 2016-11-04