gparted: correct polkit support
Use wrapGAppsHook as well
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, intltool, gettext, makeWrapper
|
{ stdenv, fetchurl, intltool, gettext, makeWrapper, coreutils, gnused
|
||||||
, parted, glib, libuuid, pkgconfig, gtkmm3, libxml2, hicolor-icon-theme
|
, gnugrep, parted, glib, libuuid, pkgconfig, gtkmm3, libxml2, hicolor-icon-theme
|
||||||
, gpart, hdparm, procps, utillinux
|
, gpart, hdparm, procps, utillinux, polkit, wrapGAppsHook, substituteAll
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@@ -11,16 +11,31 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0mdvn85jvy72ff7nds3dakx9kzknh8gx1z8i0w2sf970q03qp2z4";
|
sha256 = "0mdvn85jvy72ff7nds3dakx9kzknh8gx1z8i0w2sf970q03qp2z4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Tries to run `pkexec --version` to get version.
|
||||||
|
# however the binary won't be suid so it returns
|
||||||
|
# an error preventing the program from detection
|
||||||
|
patches = [
|
||||||
|
(substituteAll {
|
||||||
|
src = ./polkit.patch;
|
||||||
|
polkit_version = polkit.version;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [ "--disable-doc" ];
|
configureFlags = [ "--disable-doc" ];
|
||||||
|
|
||||||
buildInputs = [ parted glib libuuid gtkmm3 libxml2 hicolor-icon-theme ];
|
buildInputs = [ parted glib libuuid gtkmm3 libxml2 hicolor-icon-theme polkit.bin ];
|
||||||
nativeBuildInputs = [ intltool gettext makeWrapper pkgconfig ];
|
nativeBuildInputs = [ intltool gettext pkgconfig wrapGAppsHook ];
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
gappsWrapperArgs+=(
|
||||||
|
--prefix PATH : "${stdenv.lib.makeBinPath [ gpart hdparm utillinux procps coreutils gnused gnugrep ]}"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Doesn't get installed automaticallly if PREFIX != /usr
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/gparted \
|
install -D -m0644 org.gnome.gparted.policy \
|
||||||
--prefix PATH : "${procps}/bin"
|
$out/share/polkit-1/actions/org.gnome.gparted.policy
|
||||||
wrapProgram $out/sbin/gpartedbin \
|
|
||||||
--prefix PATH : "${stdenv.lib.makeBinPath [ gpart hdparm utillinux ]}"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
diff -ru old/gparted-1.0.0/configure gparted-1.0.0/configure
|
||||||
|
--- old/gparted-1.0.0/configure 2019-05-29 12:02:13.000000000 -0400
|
||||||
|
+++ gparted-1.0.0/configure 2019-08-08 18:09:52.792795781 -0400
|
||||||
|
@@ -16145,7 +16145,7 @@
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkexec >= $PKEXEC_REQUIRED_VERSION" >&5
|
||||||
|
$as_echo_n "checking for pkexec >= $PKEXEC_REQUIRED_VERSION... " >&6; }
|
||||||
|
PKEXEC_REQUIRED_INT=`echo "$PKEXEC_REQUIRED_VERSION" | $AWK -F. '{print $1 * 10000 + $2}'`
|
||||||
|
-PKEXEC_VERSION_OUTPUT=`pkexec --version 2> /dev/null` ||
|
||||||
|
+PKEXEC_VERSION_OUTPUT='pkexec version @polkit_version@' ||
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||||
|
$as_echo "not found" >&6; }
|
||||||
|
if test "x$PKEXEC_VERSION_OUTPUT" != 'x'; then
|
||||||
Reference in New Issue
Block a user