diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8e8c9f2fb10..699707e1f3a 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -302,6 +302,12 @@ githubId = 786394; name = "Alexander Krupenkin "; }; + albakham = { + email = "dev@geber.ga"; + github = "albakham"; + githubId = 43479487; + name = "Titouan Biteau"; + }; alexarice = { email = "alexrice999@hotmail.co.uk"; github = "alexarice"; @@ -4398,6 +4404,12 @@ github = "ltavard"; name = "Laure Tavard"; }; + luc65r = { + email = "lucas@ransan.tk"; + github = "luc65r"; + githubId = 59375051; + name = "Lucas Ransan"; + }; lucus16 = { email = "lars.jellema@gmail.com"; github = "Lucus16"; diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix index 1c7284a2db2..e43614d9d22 100644 --- a/pkgs/applications/misc/rofi/wrapper.nix +++ b/pkgs/applications/misc/rofi/wrapper.nix @@ -1,23 +1,25 @@ -{ stdenv, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null }: +{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null, plugins ? [] }: -stdenv.mkDerivation { - pname = "rofi"; - version = rofi-unwrapped.version; +symlinkJoin { + name = "rofi-${rofi-unwrapped.version}"; + + paths = [ + rofi-unwrapped.out + ] ++ (lib.forEach plugins (p: p.out)); buildInputs = [ makeWrapper ]; preferLocalBuild = true; passthru.unwrapped = rofi-unwrapped; - buildCommand = '' - mkdir $out - ln -s ${rofi-unwrapped}/* $out - rm $out/bin + postBuild = '' + rm -rf $out/bin mkdir $out/bin ln -s ${rofi-unwrapped}/bin/* $out/bin rm $out/bin/rofi makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \ --prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \ - ${if theme != null then ''--add-flags "-theme ${theme}"'' else ""} + ${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \ + ${lib.optionalString (plugins != []) ''--add-flags "-plugin-path $out/lib/rofi"''} rm $out/bin/rofi-theme-selector makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \ diff --git a/pkgs/applications/science/math/rofi-calc/0001-Patch-plugindir-to-output.patch b/pkgs/applications/science/math/rofi-calc/0001-Patch-plugindir-to-output.patch new file mode 100644 index 00000000000..197d1347d53 --- /dev/null +++ b/pkgs/applications/science/math/rofi-calc/0001-Patch-plugindir-to-output.patch @@ -0,0 +1,25 @@ +From 0eaef67b683683fb423fcb2d5096b3cdf9a4a9cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= +Date: Sun, 22 Mar 2020 12:26:10 +0100 +Subject: [PATCH] Patch plugindir to output + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 50edb74..639ee86 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -50,7 +50,7 @@ PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0 gmodule-2.0 ]) + PKG_CHECK_MODULES([cairo], [cairo]) + PKG_CHECK_MODULES([rofi], [rofi >= 1.5.4]) + +-[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]) +-- +2.25.1 + diff --git a/pkgs/applications/science/math/rofi-calc/default.nix b/pkgs/applications/science/math/rofi-calc/default.nix new file mode 100644 index 00000000000..842265cf3d5 --- /dev/null +++ b/pkgs/applications/science/math/rofi-calc/default.nix @@ -0,0 +1,54 @@ +{ stdenv +, fetchFromGitHub +, autoreconfHook +, pkgconfig +, rofi-unwrapped +, libqalculate +, glib +, cairo +, gobject-introspection +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "rofi-calc"; + version = "1.6"; + + src = fetchFromGitHub { + owner = "svenstaro"; + repo = pname; + rev = "v${version}"; + sha256 = "00pz0s99pihjdjy8pl4ckg2qciyp32k439lmjb5iazwck512ar92"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkgconfig + gobject-introspection + wrapGAppsHook + ]; + + buildInputs = [ + rofi-unwrapped + libqalculate + glib + cairo + ]; + + patches = [ + ./0001-Patch-plugindir-to-output.patch + ]; + + postPatch = '' + sed "s|qalc_binary = \"qalc\"|qalc_binary = \"${libqalculate}/bin/qalc\"|" -i src/calc.c + ''; + + meta = with stdenv.lib; { + description = "Do live calculations in rofi!"; + homepage = "https://github.com/svenstaro/rofi-calc"; + license = licenses.mit; + maintainers = with maintainers; [ luc65r albakham ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef0d40f91b1..32c1edaec43 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20671,6 +20671,8 @@ in rofi-mpd = callPackage ../applications/audio/rofi-mpd { }; + rofi-calc = callPackage ../applications/science/math/rofi-calc { }; + ympd = callPackage ../applications/audio/ympd { }; nload = callPackage ../applications/networking/nload { };