2021-05-29 03:34:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bash
|
2023-04-29 16:46:19 +00:00
|
|
|
, cmake
|
2021-05-29 03:34:57 +00:00
|
|
|
, dockbarx
|
|
|
|
, gobject-introspection
|
|
|
|
, keybinder3
|
|
|
|
, pkg-config
|
|
|
|
, python3Packages
|
|
|
|
, wrapGAppsHook
|
|
|
|
, xfce
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xfce4-dockbarx-plugin";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-04-05 15:23:46 +00:00
|
|
|
owner = "xuzhen";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "xfce4-dockbarx-plugin";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-ZxaWORqA8LiM4CzakxClg5C6AsyHrzCGydgboCrC45g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
pythonPath = [
|
|
|
|
dockbarx
|
|
|
|
python3Packages.pygobject3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
nativeBuildInputs = [
|
2023-04-29 16:46:19 +00:00
|
|
|
cmake
|
2021-05-29 03:34:57 +00:00
|
|
|
gobject-introspection
|
|
|
|
pkg-config
|
|
|
|
python3Packages.wrapPython
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
keybinder3
|
|
|
|
python3Packages.python
|
|
|
|
xfce.xfce4-panel
|
|
|
|
xfce.xfconf
|
|
|
|
]
|
|
|
|
++ pythonPath;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
# 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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2021-05-29 03:34:57 +00:00
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2023-04-29 16:46:19 +00:00
|
|
|
chmod +x $out/share/dockbarx/xfce4-panel-plug
|
|
|
|
wrapPythonProgramsIn "$out/share/dockbarx" "$out $pythonPath"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-04-05 15:23:46 +00:00
|
|
|
homepage = "https://github.com/xuzhen/xfce4-dockbarx-plugin";
|
2021-05-29 03:34:57 +00:00
|
|
|
description = "Plugins to embed DockbarX into xfce4-panel";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.xfce.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|