From ff60f2ca07e5007933e1bf2921520d2d76d607c0 Mon Sep 17 00:00:00 2001 From: Magnus Bergmark Date: Tue, 23 Jul 2024 23:32:09 +0200 Subject: [PATCH 1/2] maintainers: add Mange. --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index af21a01d2d92..7047511ec81b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12349,6 +12349,13 @@ githubId = 115060; name = "Marek Maksimczyk"; }; + Mange = { + name = "Magnus Bergmark"; + email = "me@mange.dev"; + github = "Mange"; + githubId = 1599; + keys = [ { fingerprint = "2EA6 F4AA 110A 1BF2 2275 19A9 0443 C69F 6F02 2CDE"; } ]; + }; mangoiv = { email = "contact@mangoiv.com"; github = "mangoiv"; From 9d67a1f61e06fe425e9ab8d23c0dc43838d5eb72 Mon Sep 17 00:00:00 2001 From: Magnus Bergmark Date: Tue, 23 Jul 2024 23:49:20 +0200 Subject: [PATCH 2/2] rofi-emoji: Split into v4 and v3 versions https://github.com/Mange/rofi-emoji/releases/tag/v4.0.0 rofi-emoji now has two branches, one for the stable release of Rofi and another for the unstable unreleased version of Rofi. A lot of Rofi forks are based on this unstable branch, which causes some issues for users. Having the latest release available should be helpful for those users. The default named `rofi-emoji` version is version 3, which builds against the current version of the `rofi` pkg. The other version is exposed as `rofi-emoji-wayland` and is built with version 4 against the `rofi-wayland` fork. Other changes: - Add Mange as maintainer. - Update 3.4.0 to 3.4.1. - Stop requiring xsel. - Only require xclip with X11 support enabled. - Only require wl-clipboard with Wayland support enabled. --- pkgs/applications/misc/rofi-emoji/default.nix | 89 +++++++++---------- .../applications/misc/rofi-emoji/versions.nix | 18 ++++ pkgs/top-level/all-packages.nix | 7 +- 3 files changed, 67 insertions(+), 47 deletions(-) create mode 100644 pkgs/applications/misc/rofi-emoji/versions.nix diff --git a/pkgs/applications/misc/rofi-emoji/default.nix b/pkgs/applications/misc/rofi-emoji/default.nix index 71d7ee69b1dc..39004f04945e 100644 --- a/pkgs/applications/misc/rofi-emoji/default.nix +++ b/pkgs/applications/misc/rofi-emoji/default.nix @@ -15,61 +15,58 @@ , rofi-unwrapped , wl-clipboard , xclip -, xsel , xdotool , wtype }: -stdenv.mkDerivation rec { - pname = "rofi-emoji"; - version = "3.4.0"; +import ./versions.nix ({ version, hash, patches}: + stdenv.mkDerivation rec { + pname = "rofi-emoji"; + inherit version; - src = fetchFromGitHub { - owner = "Mange"; - repo = pname; - rev = "v${version}"; - hash = "sha256-tF3yAKRUix+if+45rxg5vq83Pu33TQ6oUKWPIs/l4X0="; - }; + src = fetchFromGitHub { + owner = "Mange"; + repo = "rofi-emoji"; + rev = "v${version}"; + inherit hash; + }; - patches = [ - # Look for plugin-related files in $out/lib/rofi - ./0001-Patch-plugindir-to-output.patch - ]; + inherit patches; - postPatch = '' - patchShebangs clipboard-adapter.sh - ''; + postPatch = '' + patchShebangs clipboard-adapter.sh + ''; - postFixup = '' - chmod +x $out/share/rofi-emoji/clipboard-adapter.sh - wrapProgram $out/share/rofi-emoji/clipboard-adapter.sh \ - --prefix PATH ":" ${lib.makeBinPath ([ libnotify wl-clipboard xclip xsel ] - ++ lib.optionals waylandSupport [ wtype ] - ++ lib.optionals x11Support [ xdotool ])} - ''; + postFixup = '' + chmod +x $out/share/rofi-emoji/clipboard-adapter.sh + wrapProgram $out/share/rofi-emoji/clipboard-adapter.sh \ + --prefix PATH ":" ${lib.makeBinPath ([ libnotify ] + ++ lib.optionals waylandSupport [ wl-clipboard wtype ] + ++ lib.optionals x11Support [ xclip xdotool ])} + ''; - nativeBuildInputs = [ - autoreconfHook - pkg-config - makeWrapper - ]; + nativeBuildInputs = [ + autoreconfHook + pkg-config + makeWrapper + ]; - buildInputs = [ - cairo - glib - libnotify - rofi-unwrapped - wl-clipboard - xclip - xsel - ]; + buildInputs = [ + cairo + glib + libnotify + rofi-unwrapped + ] + ++ lib.optionals waylandSupport [ wl-clipboard wtype ] + ++ lib.optionals x11Support [ xclip ]; - meta = with lib; { - description = "Emoji selector plugin for Rofi"; - homepage = "https://github.com/Mange/rofi-emoji"; - license = licenses.mit; - maintainers = with maintainers; [ cole-h ]; - platforms = platforms.linux; - }; -} + meta = with lib; { + description = "Emoji selector plugin for Rofi (built against ${rofi-unwrapped.pname})"; + homepage = "https://github.com/Mange/rofi-emoji"; + license = licenses.mit; + maintainers = with maintainers; [ cole-h Mange ]; + platforms = platforms.linux; + }; + } +) diff --git a/pkgs/applications/misc/rofi-emoji/versions.nix b/pkgs/applications/misc/rofi-emoji/versions.nix new file mode 100644 index 000000000000..20b79d584634 --- /dev/null +++ b/pkgs/applications/misc/rofi-emoji/versions.nix @@ -0,0 +1,18 @@ +generic: { + v4 = generic { + version = "4.0.0"; + hash = "sha256-864Mohxfc3EchBKtSNifxy8g8T8YBUQ/H7+8Ti6TiFo="; + patches = [ + # Look for plugin-related files in $out/lib/rofi + ./0001-Patch-plugindir-to-output.patch + ]; + }; + v3 = generic { + version = "3.4.1"; + hash = "sha256-ZHhgYytPB14zj2MS8kChRD+LTqXzHRrz7YIikuQD6i0="; + patches = [ + # Look for plugin-related files in $out/lib/rofi + ./0001-Patch-plugindir-to-output.patch + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6f6b69f82eaf..63737a263c36 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32469,7 +32469,12 @@ with pkgs; rofi-calc = callPackage ../applications/science/math/rofi-calc { }; - rofi-emoji = callPackage ../applications/misc/rofi-emoji { }; + rofi-emoji = (callPackage ../applications/misc/rofi-emoji { }).v3; + rofi-emoji-wayland = ( + callPackage ../applications/misc/rofi-emoji { + rofi-unwrapped = rofi-wayland-unwrapped; + } + ).v4; rofi-file-browser = callPackage ../applications/misc/rofi-file-browser { };