rofi-{emoji,rbw}: move to pkgs/by-name, update and remove some antipatterns (#410737)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
)
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{ rofi-rbw }:
|
||||
rofi-rbw.override {
|
||||
waylandSupport = true;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ rofi-rbw }:
|
||||
rofi-rbw.override {
|
||||
x11Support = true;
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -11838,21 +11838,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 { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user