Merge pull request #180887 from aacebedo/rofi-top

This commit is contained in:
Sandro 2022-07-25 15:33:29 +02:00 committed by GitHub
commit b08ade8295
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index 4d2df69..3260910 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ dnl ---------------------------------------------------------------------
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0 gmodule-2.0 libgtop-2.0])
PKG_CHECK_MODULES([rofi], [rofi])
-[rofi_PLUGIN_INSTALL_DIR]="`$PKG_CONFIG --variable=pluginsdir rofi`"
+[rofi_PLUGIN_INSTALL_DIR]="`echo $out/lib/rofi`"
AC_SUBST([rofi_PLUGIN_INSTALL_DIR])
LT_INIT([disable-static])

View file

@ -0,0 +1,25 @@
diff --git a/Makefile.am b/Makefile.am
index 24c1a85..cfabbbf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,6 @@ plugin_LTLIBRARIES = top.la
top_la_SOURCES=\
src/top.c
-top_la_CFLAGS= @glib_CFLAGS@ @rofi_CFLAGS@
-top_la_LIBADD= @glib_LIBS@ @rofi_LIBS@
+top_la_CFLAGS= @glib_CFLAGS@ @rofi_CFLAGS@ @cairo_CFLAGS@
+top_la_LIBADD= @glib_LIBS@ @rofi_LIBS@ @cairo_LIBS@
top_la_LDFLAGS= -module -avoid-version
diff --git a/configure.ac b/configure.ac
index 4d2df69..f340a7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,7 @@ dnl PKG_CONFIG based dependencies
dnl ---------------------------------------------------------------------
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0 gmodule-2.0 libgtop-2.0])
PKG_CHECK_MODULES([rofi], [rofi])
+PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
[rofi_PLUGIN_INSTALL_DIR]="`$PKG_CONFIG --variable=pluginsdir rofi`"
AC_SUBST([rofi_PLUGIN_INSTALL_DIR])

View file

@ -0,0 +1,51 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, cairo
, glib
, gobject-introspection
, libgtop
, pkg-config
, rofi-unwrapped
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "rofi-top";
version = "unstable-2017-10-16";
src = fetchFromGitHub {
owner = "davatorium";
repo = pname;
rev = "9416addf91dd1bd25dfd5a8c5f1c7297c444408e";
sha256 = "sha256-lNsmx1xirepITpUD30vpcs5slAQYQcvDW8FkA2K9JtU=";
};
patches = [
./0001-Patch-plugindir-to-output.patch
./0002-Patch-add-cairo.patch
];
nativeBuildInputs = [
autoreconfHook
gobject-introspection
pkg-config
wrapGAppsHook
];
buildInputs = [
cairo
glib
libgtop
rofi-unwrapped
];
meta = with lib; {
description = "A plugin for rofi that emulates top behaviour";
homepage = "https://github.com/davatorium/rofi-top";
license = licenses.mit;
maintainers = with maintainers; [ aacebedo ];
platforms = platforms.linux;
};
}

View file

@ -28962,6 +28962,8 @@ with pkgs;
rofi-rbw = python3Packages.callPackage ../applications/misc/rofi-rbw { };
rofi-top = callPackage ../applications/misc/rofi-top { };
rofi-vpn = callPackage ../applications/networking/rofi-vpn { };
ympd = callPackage ../applications/audio/ympd { };