Merge pull request #228083 from bobby285271/upd/warpinator

cinnamon.warpinator: 1.4.5 -> 1.6.1
This commit is contained in:
Bobby Rong 2023-04-27 23:34:20 +08:00 committed by GitHub
commit 76a85de7a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
{ fetchFromGitHub { stdenv
, fetchFromGitHub
, lib , lib
, gobject-introspection , gobject-introspection
, meson , meson
@ -6,24 +7,39 @@
, python3 , python3
, gtk3 , gtk3
, gdk-pixbuf , gdk-pixbuf
, xapp
, wrapGAppsHook , wrapGAppsHook
, gettext , gettext
, polkit , polkit
, glib , glib
, gitUpdater , gitUpdater
, bubblewrap
}: }:
python3.pkgs.buildPythonApplication rec { let
pythonEnv = python3.withPackages (pp: with pp; [
grpcio-tools
protobuf
pygobject3
setproctitle
pp.xapp
zeroconf
grpcio
setuptools
cryptography
pynacl
netifaces
]);
in
stdenv.mkDerivation rec {
pname = "warpinator"; pname = "warpinator";
version = "1.4.5"; version = "1.6.1";
format = "other";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "linuxmint"; owner = "linuxmint";
repo = pname; repo = pname;
rev = version; rev = version;
hash = "sha256-5mMV4WinpFR9ihgoQsgIXre0VpBdg9S8GjSkx+7ocLg="; hash = "sha256-H8bFSgx3IysHCoKrMZ9gbwRl9forEjY90a/PIC68E6k=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -39,20 +55,8 @@ python3.pkgs.buildPythonApplication rec {
glib glib
gtk3 gtk3
gdk-pixbuf gdk-pixbuf
]; pythonEnv
propagatedBuildInputs = with python3.pkgs; [
grpcio-tools
protobuf
pygobject3
setproctitle
xapp xapp
zeroconf
grpcio
setuptools
cryptography
pynacl
netifaces
]; ];
mesonFlags = [ mesonFlags = [
@ -66,15 +70,18 @@ python3.pkgs.buildPythonApplication rec {
find . -type f -exec sed -i \ find . -type f -exec sed -i \
-e s,/usr/libexec/warpinator,$out/libexec/warpinator,g \ -e s,/usr/libexec/warpinator,$out/libexec/warpinator,g \
{} + {} +
'';
dontWrapGApps = true; # Prevent double wrapping # We make bubblewrap mode always available since
# landlock mode is not supported in old kernels.
substituteInPlace src/warpinator-launch.py \
--replace '"/bin/python3"' '"${pythonEnv.interpreter}"' \
--replace "/bin/bwrap" "${bubblewrap}/bin/bwrap" \
--replace 'GLib.find_program_in_path("bwrap")' "True"
preFixup = '' # Typo fix that can be removed on next update
# these get loaded via import from bin, so don't need wrapping # https://github.com/linuxmint/warpinator/pull/174
chmod -x+X $out/libexec/warpinator/*.py substituteInPlace src/remote.py \
--replace "receiver.remaining_count" "op.remaining_count"
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
''; '';
passthru.updateScript = gitUpdater { passthru.updateScript = gitUpdater {