diff --git a/pkgs/applications/misc/rofi-top/0001-Patch-plugindir-to-output.patch b/pkgs/applications/misc/rofi-top/0001-Patch-plugindir-to-output.patch new file mode 100644 index 000000000000..f749d6f220ef --- /dev/null +++ b/pkgs/applications/misc/rofi-top/0001-Patch-plugindir-to-output.patch @@ -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]) diff --git a/pkgs/applications/misc/rofi-top/0002-Patch-add-cairo.patch b/pkgs/applications/misc/rofi-top/0002-Patch-add-cairo.patch new file mode 100644 index 000000000000..dd7d7c223a8b --- /dev/null +++ b/pkgs/applications/misc/rofi-top/0002-Patch-add-cairo.patch @@ -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]) diff --git a/pkgs/applications/misc/rofi-top/default.nix b/pkgs/applications/misc/rofi-top/default.nix new file mode 100644 index 000000000000..328eca9da894 --- /dev/null +++ b/pkgs/applications/misc/rofi-top/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd113d1b82db..463c536eba49 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };