From bdbf8538e1739620feb50b998e900e12fb2cee47 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Sun, 25 Aug 2024 13:32:21 +0300 Subject: [PATCH 1/3] rathole: move to pkgs/by-name --- .../rathole/default.nix => by-name/ra/rathole/package.nix} | 6 +++--- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) rename pkgs/{tools/networking/rathole/default.nix => by-name/ra/rathole/package.nix} (91%) diff --git a/pkgs/tools/networking/rathole/default.nix b/pkgs/by-name/ra/rathole/package.nix similarity index 91% rename from pkgs/tools/networking/rathole/default.nix rename to pkgs/by-name/ra/rathole/package.nix index 8453792e703e..4cd63d458e26 100644 --- a/pkgs/tools/networking/rathole/default.nix +++ b/pkgs/by-name/ra/rathole/package.nix @@ -5,7 +5,7 @@ , pkg-config , openssl , nixosTests -, CoreServices +, darwin }: rustPlatform.buildRustPackage rec { @@ -27,9 +27,9 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices - ]; + ]); __darwinAllowLocalNetworking = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3f3741a71ad7..47a30559fbd8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18732,10 +18732,6 @@ with pkgs; ran = callPackage ../servers/http/ran { }; - rathole = callPackage ../tools/networking/rathole { - inherit (darwin.apple_sdk.frameworks) CoreServices; - }; - retry = callPackage ../tools/system/retry { }; rizin = pkgs.callPackage ../development/tools/analysis/rizin { }; From 4854f87b04ae1e4c4c6de018adf11c4a8f1358d2 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Sun, 25 Aug 2024 13:33:25 +0300 Subject: [PATCH 2/3] rathole: format with nixfmt --- pkgs/by-name/ra/rathole/package.nix | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/ra/rathole/package.nix b/pkgs/by-name/ra/rathole/package.nix index 4cd63d458e26..6e6138e44830 100644 --- a/pkgs/by-name/ra/rathole/package.nix +++ b/pkgs/by-name/ra/rathole/package.nix @@ -1,11 +1,12 @@ -{ lib -, stdenv -, fetchFromGitHub -, rustPlatform -, pkg-config -, openssl -, nixosTests -, darwin +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + pkg-config, + openssl, + nixosTests, + darwin, }: rustPlatform.buildRustPackage rec { @@ -21,21 +22,19 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-UyQXAUPnp32THZJAs/p3bIXZjcXTvjy207QBVLCfkr8="; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ - CoreServices - ]); + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices ]); __darwinAllowLocalNetworking = true; doCheck = false; # https://github.com/rapiz1/rathole/issues/222 - passthru.tests = { inherit (nixosTests) rathole; }; + passthru.tests = { + inherit (nixosTests) rathole; + }; meta = with lib; { description = "Reverse proxy for NAT traversal"; From 7fcb06ad6d3dae041b70d82fda0067c31f8e58d9 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Tue, 27 Aug 2024 00:31:26 +0300 Subject: [PATCH 3/3] rathole: 0.5.0 -> 0.5.0-unstable-2024-06-06 - Update to [be14d12](https://github.com/rapiz1/rathole/commit/be14d12), which has Rust 1.80 fixes - Re-enable doCheck - Add myself as maintainer - Sort meta attributes - Remove with lib; usage - Drop changelog for unstable version, since upstream does not track unreleased changes --- pkgs/by-name/ra/rathole/package.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ra/rathole/package.nix b/pkgs/by-name/ra/rathole/package.nix index 6e6138e44830..38d163daf8d8 100644 --- a/pkgs/by-name/ra/rathole/package.nix +++ b/pkgs/by-name/ra/rathole/package.nix @@ -9,18 +9,18 @@ darwin, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage { pname = "rathole"; - version = "0.5.0"; + version = "0.5.0-unstable-2024-06-06"; src = fetchFromGitHub { owner = "rapiz1"; - repo = pname; - rev = "refs/tags/v${version}"; - hash = "sha256-YfLzR1lHk+0N3YU1XTNxz+KE1S3xaiKJk0zASm6cr1s="; + repo = "rathole"; + rev = "be14d124a22e298d12d92e56ef4fec0e51517998"; + hash = "sha256-C0/G4JOZ4pTAvcKZhRHsGvlLlwAyWBQ0rMScLvaLSuA="; }; - cargoHash = "sha256-UyQXAUPnp32THZJAs/p3bIXZjcXTvjy207QBVLCfkr8="; + cargoHash = "sha256-zlwIgzqpoEgYqZe4Gv8owJQ3m7UFgPA5joRMiyq+T/M="; nativeBuildInputs = [ pkg-config ]; @@ -30,18 +30,18 @@ rustPlatform.buildRustPackage rec { __darwinAllowLocalNetworking = true; - doCheck = false; # https://github.com/rapiz1/rathole/issues/222 - passthru.tests = { inherit (nixosTests) rathole; }; - meta = with lib; { + meta = { description = "Reverse proxy for NAT traversal"; homepage = "https://github.com/rapiz1/rathole"; - changelog = "https://github.com/rapiz1/rathole/releases/tag/v${version}"; - license = licenses.asl20; - maintainers = with maintainers; [ dit7ya ]; + license = lib.licenses.asl20; mainProgram = "rathole"; + maintainers = with lib.maintainers; [ + dit7ya + xokdvium + ]; }; }