The ricochet-irc package provides a gui-less ricochet client that you connect
to using any IRC client. See `meta.longDescription` for important usage notes.
---
pkgs/by-name/ri/ricochet-irc/package.nix | 80 ++++++++++++++++++++++++
1 file changed, 80 insertions(+)
create mode 100644 pkgs/by-name/ri/ricochet-irc/package.nix
diff --git a/pkgs/by-name/ri/ricochet-irc/package.nix b/pkgs/by-name/ri/ricochet-irc/package.nix
new file mode 100644
index 000000000000..b087125634f3
--- /dev/null+++ b/pkgs/by-name/ri/ricochet-irc/package.nix
@@ -0,0 +1,80 @@
+{ lib+, stdenv+, ricochet-refresh+, fetchFromGitHub+, fetchpatch+}:++(ricochet-refresh.override {+ enableGui = false;++}).overrideAttrs (finalAttrs: previousAttrs: {++ pname = "ricochet-irc";+ version = "3.0.11.2";++ src = (fetchFromGitHub {+ owner = "wfr";+ repo = "ricochet-irc";+ rev = "irc-v${finalAttrs.version}";+ sha256 = "sha256-hN2XaKGurPVx1rbfBPFvvOYyh1CuPFfycPee/MGrkak=";+ fetchSubmodules = false;+ forceFetchGit = true;+ }).overrideAttrs (previousAttrs: {+ env = (previousAttrs.env or {}) // {+ # We need to fetch the `src/extern/tor` git submodule, but it+ # has nested submodules which are no longer fetchable+ # (e.g. `tor/src/ext/rust`); fortunately these broken references+ # are not needed for building ricochet-irc.+ NIX_PREFETCH_GIT_CHECKOUT_HOOK = ''+ git -C $out submodule update --init+ '';+ };+ });++ patches = (previousAttrs.patches or []) ++ [+ (fetchpatch {+ url = "https://github.com/JeremyRand/ricochet-refresh/commit/d826d0257f78cf90788197c8023e0daf4d3cfd71.patch";+ hash = "sha256-bq2lGOD4QobwrZQua1B2tpIOaFAmKp7M9liyU/rLc/U=";+ stripLen = 1;+ })+ ];++ postInstall = (previousAttrs.postInstall or "") + ''+ mv $out/usr/* $out/+ rmdir $out/usr+ '';++ meta = {+ description = "Allows using an IRC client with Ricochet Refresh";+ longDescription = ''+ This package is a headless, gui-less Ricochet client which lets you use+ any IRC client to interact with the Ricochet network.++ This package exports an (very limited) IRC server interface, exposing+ only one channel #ricochet. Inbound pairing requests will appear as+ messages on this channel, and commands (such as making outbound pairing+ requests) can be issued in this channel. All other ricochet users+ appear as users on this IRC server to whom you may send `/msg` messages.+ Important note: do not try to `/join` any other channel besides+ #ricochet -- there will never be anybody else in those channels. All+ communication with other users takes place using `/msg`, not `/join`.++ If you `/msg` a user whose Ricochet client is offline you will be told+ that they are "away", and ricochet-irc will continually attempt to+ resend your message until either it is delivered or until ricochet-irc+ restarts. All undelivered messages are lost when you restart the+ ricochet-irc daemon. Unlike the gui client, ricochet-irc currently does+ not provide any way to know if a contact is online or not (the+ green/gray circle in the gui) without attempting to send something to+ them.++ See the ricochet-refresh package description for more details about the+ Ricochet protocol.+ '';+ downloadPage = "https://github.com/wfr/ricochet-irc/releases";+ changelog = "https://github.com/wfr/ricochet-irc/blob/master/CHANGES.md";+ license = lib.licenses.gpl3;+ };++})
--
2.42.0
On 4/15/24 01:11, Adam Joseph wrote:
> + src = (fetchFromGitHub {> + owner = "wfr";> + repo = "ricochet-irc";> + rev = "irc-v${finalAttrs.version}";> + sha256 = "sha256-hN2XaKGurPVx1rbfBPFvvOYyh1CuPFfycPee/MGrkak=";> + fetchSubmodules = false;> + forceFetchGit = true;> + }).overrideAttrs (previousAttrs: {> + env = (previousAttrs.env or {}) // {> + # We need to fetch the `src/extern/tor` git submodule, but it> + # has nested submodules which are no longer fetchable> + # (e.g. `tor/src/ext/rust`); fortunately these broken references> + # are not needed for building ricochet-irc.> + NIX_PREFETCH_GIT_CHECKOUT_HOOK = ''> + git -C $out submodule update --init> + '';> + };> + });
If this is a completely separate repository, why not make a new
expression even if it shares a lot with the other one? There doesn't
seem to be a guarantee, really, that they won't diverge in the future.
On Thu, Apr 18, 2024 at 04:44:15PM +0200, sternenseemann wrote:
>>>On 4/15/24 01:11, Adam Joseph wrote:>>+ src = (fetchFromGitHub {>>+ owner = "wfr";>>+ repo = "ricochet-irc";>>+ rev = "irc-v${finalAttrs.version}";>>+ sha256 = "sha256-hN2XaKGurPVx1rbfBPFvvOYyh1CuPFfycPee/MGrkak=";>>+ fetchSubmodules = false;>>+ forceFetchGit = true;>>+ }).overrideAttrs (previousAttrs: {>>+ env = (previousAttrs.env or {}) // {>>+ # We need to fetch the `src/extern/tor` git submodule, but it>>+ # has nested submodules which are no longer fetchable>>+ # (e.g. `tor/src/ext/rust`); fortunately these broken references>>+ # are not needed for building ricochet-irc.>>+ NIX_PREFETCH_GIT_CHECKOUT_HOOK = ''>>+ git -C $out submodule update --init>>+ '';>>+ };>>+ });>If this is a completely separate repository, why not make a new >expression even if it shares a lot with the other one? There doesn't >seem to be a guarantee, really, that they won't diverge in the future.
Yeah, even if it started as a fork of cochet-im/ricochet, this is a
separate project, so should get a separate expression, and probably
separate set of maintainers.
Sending fixes to nixpkgs is one thing, adding new packages (and
maintaining them) without a GH account isn't really feasible, and
considering you deleted your GH account (?) I suggest maintaining this
expression downstream.
flokli