xfce.xfce4-dockbarx-plugin: 0.6 -> 0.7.2

https://github.com/xuzhen/xfce4-dockbarx-plugin/compare/v0.6...v0.7.2
This commit is contained in:
Bobby Rong 2023-04-21 10:37:42 +08:00
parent 5d8ba448c2
commit cf25c427f3
No known key found for this signature in database

View File

@ -2,28 +2,25 @@
, stdenv
, fetchFromGitHub
, bash
, cmake
, dockbarx
, gobject-introspection
, keybinder3
, pkg-config
, python3Packages
, vala
, wafHook
, wrapGAppsHook
, xfce
}:
stdenv.mkDerivation rec {
pname = "xfce4-dockbarx-plugin";
version = "${ver}-${rev}";
ver = "0.6";
rev = "5213876151f1836f044e9902a22d1e682144c1e0";
version = "0.7.2";
src = fetchFromGitHub {
owner = "xuzhen";
repo = "xfce4-dockbarx-plugin";
rev = rev;
sha256 = "sha256-VqtGcBRjvpCO9prVHOv6Gt1rAZtcAgkQkVCoR6ykC2k=";
rev = "v${version}";
sha256 = "sha256-ZxaWORqA8LiM4CzakxClg5C6AsyHrzCGydgboCrC45g=";
};
pythonPath = [
@ -32,11 +29,10 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [
cmake
gobject-introspection
pkg-config
python3Packages.wrapPython
vala
wafHook
wrapGAppsHook
];
@ -49,14 +45,20 @@ stdenv.mkDerivation rec {
++ pythonPath;
postPatch = ''
substituteInPlace wscript --replace /usr/share/ "\''${PREFIX}/share/"
substituteInPlace src/dockbarx.vala --replace /usr/share/ $out/share/
substituteInPlace src/dockbarx.vala --replace '/usr/bin/env python3' ${bash}/bin/bash
# We execute the wrapped xfce4-panel-plug directly.
# Since argv is used for g_free() we also need to shift the indexes.
substituteInPlace src/xfce_panel_plugin.c \
--replace '"python3",' "" \
--replace "g_free(argv[3]);" "g_free(argv[2]);" \
--replace "g_free(argv[5]);" "g_free(argv[4]);"
patchShebangs src/xfce4-dockbarx-plug.py
'';
postFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonProgramsIn "$out/share/xfce4/panel/plugins" "$out $pythonPath"
chmod +x $out/share/dockbarx/xfce4-panel-plug
wrapPythonProgramsIn "$out/share/dockbarx" "$out $pythonPath"
'';
meta = with lib; {