From 5a0ec6d5eba212eaa73fecb6718ce22ca85085a5 Mon Sep 17 00:00:00 2001 From: andreashgk Date: Thu, 6 Nov 2025 13:00:08 +0100 Subject: [PATCH] iroh: split into iroh-relay, iroh-dns-server The project no longer provides one main binary. --- doc/release-notes/rl-2605.section.md | 2 + pkgs/by-name/ir/iroh/package.nix | 33 ---------------- pkgs/tools/networking/iroh/default.nix | 55 ++++++++++++++++++++++++++ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 5 +++ 5 files changed, 63 insertions(+), 33 deletions(-) delete mode 100644 pkgs/by-name/ir/iroh/package.nix create mode 100644 pkgs/tools/networking/iroh/default.nix diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 212304b511db..265f959e863c 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -14,6 +14,8 @@ - `kanata` now requires `karabiner-dk` version 6.0+ or later. The package has been updated to use the new `karabiner-dk` package and the `darwinDriver` output stays at the version defined in the package. +- `iroh` has been removed and split up into `iroh-dns-server` and `iroh-relay`. + - All Log4Shell vulnerability scanners were removed, as they were all unmaintained upstream and are no longer relevant given that the vulnerability has been fixed upstream for several years. - `asio` (standalone version of `boost::asio`) has been updated from 1.24.0 to 1.36.0. Some breaking changes were introduced between these diff --git a/pkgs/by-name/ir/iroh/package.nix b/pkgs/by-name/ir/iroh/package.nix deleted file mode 100644 index 6f8774120eba..000000000000 --- a/pkgs/by-name/ir/iroh/package.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - lib, - fetchFromGitHub, - rustPlatform, -}: - -rustPlatform.buildRustPackage rec { - pname = "iroh"; - version = "0.93.2"; - - src = fetchFromGitHub { - owner = "n0-computer"; - repo = "iroh"; - rev = "v${version}"; - hash = "sha256-IYuOo4dfTC7IfMkwFyjqFmOYjx87i84+ydyNxnSAfk4="; - }; - - cargoHash = "sha256-aR78AKfXRAePnOVO/Krx1WGcQgOIz3d+GDwfAoM10UQ="; - - # Some tests require network access which is not available in nix build sandbox. - doCheck = false; - - meta = with lib; { - description = "Efficient IPFS for the whole world right now"; - homepage = "https://iroh.computer"; - license = with licenses; [ - asl20 - mit - ]; - maintainers = with maintainers; [ cameronfyfe ]; - mainProgram = "iroh"; - }; -} diff --git a/pkgs/tools/networking/iroh/default.nix b/pkgs/tools/networking/iroh/default.nix new file mode 100644 index 000000000000..6b52c8924dcf --- /dev/null +++ b/pkgs/tools/networking/iroh/default.nix @@ -0,0 +1,55 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, +}: +let + mkIrohPackage = + { + name, + cargoFeatures ? [ ], + }: + rustPlatform.buildRustPackage rec { + pname = name; + version = "0.93.2"; + + src = fetchFromGitHub { + owner = "n0-computer"; + repo = "iroh"; + rev = "v${version}"; + hash = "sha256-IYuOo4dfTC7IfMkwFyjqFmOYjx87i84+ydyNxnSAfk4="; + }; + + cargoHash = "sha256-aR78AKfXRAePnOVO/Krx1WGcQgOIz3d+GDwfAoM10UQ="; + + buildFeatures = cargoFeatures; + cargoBuildFlags = [ + "--bin" + name + ]; + + # Some tests require network access which is not available in nix build sandbox. + doCheck = false; + + meta = with lib; { + description = "Efficient IPFS for the whole world right now"; + homepage = "https://iroh.computer"; + license = with licenses; [ + asl20 + mit + ]; + maintainers = with maintainers; [ cameronfyfe ]; + mainProgram = name; + }; + }; +in +{ + iroh-dns-server = mkIrohPackage { + name = "iroh-dns-server"; + }; + + iroh-relay = mkIrohPackage { + name = "iroh-relay"; + cargoFeatures = [ "server" ]; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index ea8956f499b2..e467b1f44365 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -746,6 +746,7 @@ mapAliases { ipfs-migrator-all-fs-repo-migrations = throw "'ipfs-migrator-all-fs-repo-migrations' has been renamed to/replaced by 'kubo-fs-repo-migrations'"; # Converted to throw 2025-10-27 ipfs-migrator-unwrapped = throw "'ipfs-migrator-unwrapped' has been renamed to/replaced by 'kubo-migrator-unwrapped'"; # Converted to throw 2025-10-27 ir.lv2 = ir-lv2; # Added 2025-09-37 + iroh = throw "iroh has been split into iroh-dns-server and iroh-relay"; # Added 2025-11-06 isl_0_24 = throw "isl_0_24 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-10-18 iso-flags-png-320x420 = throw "'iso-flags-png-320x420' has been renamed to/replaced by 'iso-flags-png-320x240'"; # Converted to throw 2025-10-27 itktcl = throw "'itktcl' has been renamed to/replaced by 'tclPackages.itktcl'"; # Converted to throw 2025-10-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f75f8cc15b98..65bd5f09bd83 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1065,6 +1065,11 @@ with pkgs; } ); + inherit (callPackages ../tools/networking/iroh/default.nix { }) + iroh-relay + iroh-dns-server + ; + inherit (callPackages ../tools/networking/ivpn/default.nix { }) ivpn ivpn-service