diff --git a/pkgs/applications/misc/rofi-emoji/default.nix b/pkgs/applications/misc/rofi-emoji/default.nix deleted file mode 100644 index 520781f67cfcf..0000000000000 --- a/pkgs/applications/misc/rofi-emoji/default.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - makeWrapper, - - autoreconfHook, - pkg-config, - - waylandSupport ? true, - x11Support ? true, - - cairo, - glib, - libnotify, - rofi-unwrapped, - wl-clipboard, - xclip, - xdotool, - wtype, -}: - -import ./versions.nix ( - { - version, - hash, - patches, - }: - stdenv.mkDerivation rec { - pname = "rofi-emoji"; - inherit version; - - src = fetchFromGitHub { - owner = "Mange"; - repo = "rofi-emoji"; - rev = "v${version}"; - inherit hash; - }; - - inherit patches; - - 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 ] - ++ lib.optionals waylandSupport [ - wl-clipboard - wtype - ] - ++ lib.optionals x11Support [ - xclip - xdotool - ] - ) - } - ''; - - nativeBuildInputs = [ - autoreconfHook - pkg-config - makeWrapper - ]; - - 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 - Mange - ]; - platforms = platforms.linux; - }; - } -) diff --git a/pkgs/applications/misc/rofi-emoji/versions.nix b/pkgs/applications/misc/rofi-emoji/versions.nix deleted file mode 100644 index 20b79d584634c..0000000000000 --- a/pkgs/applications/misc/rofi-emoji/versions.nix +++ /dev/null @@ -1,18 +0,0 @@ -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/applications/misc/rofi-rbw/default.nix b/pkgs/applications/misc/rofi-rbw/default.nix deleted file mode 100644 index 13f9e91244e54..0000000000000 --- a/pkgs/applications/misc/rofi-rbw/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - lib, - buildPythonApplication, - fetchFromGitHub, - configargparse, - hatchling, - rbw, - - waylandSupport ? false, - wl-clipboard, - wtype, - - x11Support ? false, - xclip, - xdotool, -}: - -buildPythonApplication rec { - pname = "rofi-rbw"; - version = "1.5.1"; - format = "pyproject"; - - src = fetchFromGitHub { - owner = "fdw"; - repo = "rofi-rbw"; - tag = version; - hash = "sha256-Qdbz3UjWMCuJUzR6UMt/apt+OjMAr2U7uMtv9wxEZKE="; - }; - - nativeBuildInputs = [ - hatchling - ]; - - buildInputs = [ - rbw - ] - ++ lib.optionals waylandSupport [ - wl-clipboard - wtype - ] - ++ lib.optionals x11Support [ - xclip - xdotool - ]; - - propagatedBuildInputs = [ configargparse ]; - - pythonImportsCheck = [ "rofi_rbw" ]; - - wrapper_paths = [ - rbw - ] - ++ lib.optionals waylandSupport [ - wl-clipboard - wtype - ] - ++ lib.optionals x11Support [ - xclip - xdotool - ]; - - wrapper_flags = - lib.optionalString waylandSupport "--typer wtype --clipboarder wl-copy" - + lib.optionalString x11Support "--typer xdotool --clipboarder xclip"; - - preFixup = '' - makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath wrapper_paths} --add-flags "${wrapper_flags}") - ''; - - meta = with lib; { - description = "Rofi frontend for Bitwarden"; - homepage = "https://github.com/fdw/rofi-rbw"; - license = licenses.mit; - maintainers = with maintainers; [ - equirosa - dit7ya - ]; - platforms = platforms.linux; - mainProgram = "rofi-rbw"; - }; -} diff --git a/pkgs/applications/misc/rofi-emoji/0001-Patch-plugindir-to-output.patch b/pkgs/by-name/ro/rofi-emoji/0001-Patch-plugindir-to-output.patch similarity index 100% rename from pkgs/applications/misc/rofi-emoji/0001-Patch-plugindir-to-output.patch rename to pkgs/by-name/ro/rofi-emoji/0001-Patch-plugindir-to-output.patch diff --git a/pkgs/by-name/ro/rofi-emoji/package.nix b/pkgs/by-name/ro/rofi-emoji/package.nix new file mode 100644 index 0000000000000..03ef3156716eb --- /dev/null +++ b/pkgs/by-name/ro/rofi-emoji/package.nix @@ -0,0 +1,85 @@ +{ + stdenv, + lib, + fetchFromGitHub, + makeWrapper, + + autoreconfHook, + pkg-config, + + cairo, + glib, + libnotify, + rofi-unwrapped, + + x11Support ? true, + xclip, + xdotool, + + waylandSupport ? true, + wl-clipboard, + wtype, + + nix-update-script, +}: + +stdenv.mkDerivation (final: { + pname = "rofi-emoji"; + version = "4.1.0"; + + src = fetchFromGitHub { + owner = "Mange"; + repo = "rofi-emoji"; + rev = "v${final.version}"; + hash = "sha256-Amaz+83mSPue+pjZq/pJiCxu5QczYvmJk6f96eraaK8="; + }; + + patches = [ + # Look for plugin-related files in $out/lib/rofi + ./0001-Patch-plugindir-to-output.patch + ]; + + postFixup = '' + 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 + ]; + + buildInputs = [ + cairo + glib + rofi-unwrapped + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Emoji selector plugin for Rofi"; + homepage = "https://github.com/Mange/rofi-emoji"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + cole-h + Mange + ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/ro/rofi-rbw-wayland/package.nix b/pkgs/by-name/ro/rofi-rbw-wayland/package.nix new file mode 100644 index 0000000000000..df14e2c5f67c2 --- /dev/null +++ b/pkgs/by-name/ro/rofi-rbw-wayland/package.nix @@ -0,0 +1,4 @@ +{ rofi-rbw }: +rofi-rbw.override { + waylandSupport = true; +} diff --git a/pkgs/by-name/ro/rofi-rbw-x11/package.nix b/pkgs/by-name/ro/rofi-rbw-x11/package.nix new file mode 100644 index 0000000000000..80ef776daa514 --- /dev/null +++ b/pkgs/by-name/ro/rofi-rbw-x11/package.nix @@ -0,0 +1,4 @@ +{ rofi-rbw }: +rofi-rbw.override { + x11Support = true; +} diff --git a/pkgs/by-name/ro/rofi-rbw/package.nix b/pkgs/by-name/ro/rofi-rbw/package.nix new file mode 100644 index 0000000000000..c6d82037d52b6 --- /dev/null +++ b/pkgs/by-name/ro/rofi-rbw/package.nix @@ -0,0 +1,71 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + rbw, + + waylandSupport ? false, + wl-clipboard, + wtype, + + x11Support ? false, + xclip, + xdotool, +}: + +python3Packages.buildPythonApplication rec { + pname = "rofi-rbw"; + version = "1.5.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "fdw"; + repo = "rofi-rbw"; + tag = version; + hash = "sha256-Qdbz3UjWMCuJUzR6UMt/apt+OjMAr2U7uMtv9wxEZKE="; + }; + + build-system = [ + python3Packages.hatchling + ]; + + dependencies = [ + python3Packages.configargparse + ]; + + pythonImportsCheck = [ "rofi_rbw" ]; + + preFixup = + let + wrapperPaths = [ + rbw + ] + ++ lib.optionals waylandSupport [ + wl-clipboard + wtype + ] + ++ lib.optionals x11Support [ + xclip + xdotool + ]; + + wrapperFlags = + lib.optionalString waylandSupport " --typer wtype --clipboarder wl-copy" + + lib.optionalString x11Support " --typer xdotool --clipboarder xclip"; + in + '' + makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath wrapperPaths} --add-flags "${wrapperFlags}") + ''; + + meta = { + description = "Rofi frontend for Bitwarden"; + homepage = "https://github.com/fdw/rofi-rbw"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + equirosa + dit7ya + ]; + platforms = lib.platforms.linux; + mainProgram = "rofi-rbw"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3b48eb8809a37..a4aac3ea1ac40 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11837,21 +11837,6 @@ with pkgs; withConplay = false; }; - rofi-emoji = (callPackage ../applications/misc/rofi-emoji { }).v3; - - rofi-rbw = python3Packages.callPackage ../applications/misc/rofi-rbw { - waylandSupport = false; - x11Support = false; - }; - - rofi-rbw-wayland = python3Packages.callPackage ../applications/misc/rofi-rbw { - waylandSupport = true; - }; - - rofi-rbw-x11 = python3Packages.callPackage ../applications/misc/rofi-rbw { - x11Support = true; - }; - # a somewhat more maintained fork of ympd memento = qt6Packages.callPackage ../applications/video/memento { };