pkgs: add rofi-calc-wayland and rofi-emoji-wayland

Wayland patched versions of rofi-calc and rofi-emoji
This commit is contained in:
raf 2023-11-03 18:58:45 +03:00
parent 6943a4f089
commit 612534e7cf
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
7 changed files with 190 additions and 10 deletions

View file

@ -17,6 +17,8 @@ jobs:
- mov-cli - mov-cli
- rat - rat
- ani-cli - ani-cli
- rofi-calc-wayland
- rofi-emoji-wayland
uses: ./.github/workflows/nix.yml uses: ./.github/workflows/nix.yml
with: with:

View file

@ -17,7 +17,7 @@ inputs = {
}; };
``` ```
After adding the input, you can consume the [exposed packages](#packages) in your system configuration. After adding the input, you can consume the [exposed packages](#-packages) in your system configuration.
An example `flake.nix` would be as follows: An example `flake.nix` would be as follows:
```nix ```nix
@ -100,14 +100,14 @@ in {
There are several packages exposed by this flake. Each directory in `pkgs` contains a description of the package inside its README. There are several packages exposed by this flake. Each directory in `pkgs` contains a description of the package inside its README.
| Package | Description | | Package | Description |
| :--------------- | :------------------------------------------------------------------------------------------------: | | :----------------- | :------------------------------------------------------------------------------------------------: |
| ani-cli | An up-to-date, auto updated version of ani-cli | | ani-cli | An up-to-date, auto updated version of ani-cli |
| cloneit | A CLI tool to download specific GitHub directories or files | | cloneit | A CLI tool to download specific GitHub directories or files |
| foot-transparent | A patched version of the foot terminal emulator that brings back fullscreen transparency[^1] | | foot-transparent | A patched version of the foot terminal emulator that brings back fullscreen transparency[^1] |
| rat | Linux shell port of the horizontally spinning rat meme, complete with soundtrack and spin counter. | | rat | Linux shell port of the horizontally spinning rat meme, complete with soundtrack and spin counter. |
| reposilite-bin | A derivation for the reposilite maven repository. | | reposilite-bin | A derivation for the reposilite maven repository. |
| rofi-calc-wayland | A wayland patched version of [rofi-calc](https://github.com/svenstaro/rofi-calc) |
[^1]: Foot has broken fullscreen transparency on 1.15, which looks **really** ugly with padding. The author is dead set on not fixing it, because it's broken on one wayland compositor that a total of 7 people use. | rofi-emoji-wayland | A wayland patched version of [rofi-emoji](https://github.com/Mange/rofi-emoji) |
## 🔧 Contributing ## 🔧 Contributing
@ -116,3 +116,5 @@ PRs are always welcome.
## 🫂 Credits ## 🫂 Credits
The repository structure is mostly borrowed from [@fufexan](https://github.com/fufexan)'s [nix-gaming](https://github.com/fufexan/nix-gaming). The repository structure is mostly borrowed from [@fufexan](https://github.com/fufexan)'s [nix-gaming](https://github.com/fufexan/nix-gaming).
[^1]: Foot has broken fullscreen transparency on 1.15, which looks **really** ugly with padding. The author is dead set on not fixing it, because it's broken on one wayland compositor that a total of 7 people use.

View file

@ -47,6 +47,34 @@
"name": "nixpkgs-unstable", "name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-23.11pre543441.b644d97bda6d/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixpkgs/nixpkgs-23.11pre543441.b644d97bda6d/nixexprs.tar.xz",
"hash": "1xq7rz2bcb115xkahpvslsqpliisv2587z93izz81lna77r4na1d" "hash": "1xq7rz2bcb115xkahpvslsqpliisv2587z93izz81lna77r4na1d"
},
"rofi-calc": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "svenstaro",
"repo": "rofi-calc"
},
"pre_releases": false,
"version_upper_bound": null,
"version": "v2.2.0",
"revision": "6b9729f8cfba7f83cdf7f801509ed63bb9edd6f0",
"url": "https://api.github.com/repos/svenstaro/rofi-calc/tarball/v2.2.0",
"hash": "00qcl06birzh1kpva0vzvw7xkdv4i84krv4z9f7lx5pyfm2cwq28"
},
"rofi-emoji": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "Mange",
"repo": "rofi-emoji"
},
"pre_releases": false,
"version_upper_bound": null,
"version": "v3.2.0",
"revision": "d07ba9ff3b1bd9daae043c297e65238be35b530f",
"url": "https://api.github.com/repos/Mange/rofi-emoji/tarball/v3.2.0",
"hash": "0pj44xx7lfysj2hsixcnv2zzzl4rg789f4cdwhiscw5218phgc1z"
} }
}, },
"version": 3 "version": 3

View file

@ -0,0 +1,25 @@
From 0eaef67b683683fb423fcb2d5096b3cdf9a4a9cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= <mkg20001@gmail.com>
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

View file

@ -27,6 +27,8 @@
ani-cli = mkPackage ./ani-cli; ani-cli = mkPackage ./ani-cli;
rat = mkPackage ./rat; rat = mkPackage ./rat;
mov-cli = mkPackage ./mov-cli; mov-cli = mkPackage ./mov-cli;
rofi-calc-wayland = mkPackage ./rofi-calc-wayland;
rofi-emoji-wayland = mkPackage ./rofi-emoji-wayland;
# static packages # static packages
# need manual intervention with each update # need manual intervention with each update

View file

@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
rofi-wayland-unwrapped,
libqalculate,
glib,
cairo,
gobject-introspection,
wrapGAppsHook,
pins,
...
}: let
pin = pins.rofi-calc;
in
stdenv.mkDerivation {
pname = "rofi-calc-wayland";
inherit (pin) version;
src = fetchFromGitHub {
inherit (pin.repository) owner repo;
sha256 = pin.hash;
rev = pin.revision;
};
nativeBuildInputs = [
autoreconfHook
pkg-config
gobject-introspection
wrapGAppsHook
];
buildInputs = [
rofi-wayland-unwrapped
libqalculate
glib
cairo
];
patches = [
../../patches/0002-patch-plugin-dir.patch
];
postPatch = ''
sed "s|qalc_binary = \"qalc\"|qalc_binary = \"${libqalculate}/bin/qalc\"|" -i src/calc.c
'';
meta = with lib; {
description = "Do live calculations in rofi!";
homepage = "https://github.com/svenstaro/rofi-calc";
license = licenses.mit;
platforms = with platforms; linux;
};
}

View file

@ -0,0 +1,65 @@
{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
autoreconfHook,
pkg-config,
cairo,
glib,
libnotify,
rofi-wayland-unwrapped,
wl-clipboard,
wtype,
pins,
...
}: let
pin = pins.rofi-emoji;
in
stdenv.mkDerivation {
pname = "rofi-emoji-wayland";
inherit (pin) version;
src = fetchFromGitHub {
inherit (pin.repository) owner repo;
sha256 = pin.hash;
rev = pin.revision;
};
nativeBuildInputs = [
autoreconfHook
pkg-config
makeWrapper
];
buildInputs = [
cairo
glib
libnotify
rofi-wayland-unwrapped
wl-clipboard
wtype
];
patches = [
../../patches/0002-patch-plugin-dir.patch
];
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 wtype]}
'';
meta = {
description = "An emoji selector plugin for Rofi";
homepage = "https://github.com/Mange/rofi-emoji";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [NotAShelf];
platforms = lib.platforms.linux;
};
}