From 7e2b3626c4f3c3a7c84dfdac53cd083684a67909 Mon Sep 17 00:00:00 2001 From: novalkun Date: Sun, 13 Sep 2026 10:52:11 +0700 Subject: [PATCH] wgnord: 0.2.1 -> 0.2.2 Update src.hash, install template.conf, turn the new query alias into a function so resholve can see curl, add gawk for status, and adopt the package. Resolves #438189 Supersedes #453208 (cherry picked from commit 0d761b20d3d2b3b0470e8a41ca47a2d7c52b959f) --- pkgs/by-name/wg/wgnord/package.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/wg/wgnord/package.nix b/pkgs/by-name/wg/wgnord/package.nix index 6fbaf93240be..e2eaeb6a0fad 100644 --- a/pkgs/by-name/wg/wgnord/package.nix +++ b/pkgs/by-name/wg/wgnord/package.nix @@ -2,6 +2,7 @@ bash, coreutils, curl, + gawk, fetchFromGitHub, gnugrep, gnused, @@ -14,19 +15,21 @@ resholve.mkDerivation (finalAttrs: { pname = "wgnord"; - version = "0.2.1"; + version = "0.2.2"; src = fetchFromGitHub { owner = "phirecc"; repo = "wgnord"; rev = finalAttrs.version; - hash = "sha256-26cfYXtZVQ7kIRxY6oNGCqIjdw/hjwXhVKimVgolLgk="; + hash = "sha256-K7O3SI24bkaLuEF+7FmbXUx7H0gPKsLttEmSCc3PT2c="; }; postPatch = '' + sed -i 's|^alias query=.*|query() { curl -s -H "User-Agent: NordApp Linux $version $kernel-generic" "$@"; }|' wgnord substituteInPlace wgnord \ - --replace '$conf_dir/countries.txt' "$out/share/countries.txt" \ - --replace '$conf_dir/countries_iso31662.txt' "$out/share/countries_iso31662.txt" + --replace-fail '$conf_dir/countries.txt' "$out/share/countries.txt" \ + --replace-fail '$conf_dir/countries_iso31662.txt' "$out/share/countries_iso31662.txt" \ + --replace-fail '$conf_dir/template.conf' "$out/share/template.conf" ''; dontBuild = true; @@ -35,6 +38,7 @@ resholve.mkDerivation (finalAttrs: { install -Dm 755 wgnord -t $out/bin/ install -Dm 644 countries.txt -t $out/share/ install -Dm 644 countries_iso31662.txt -t $out/share/ + install -Dm 644 template.conf -t $out/share/ ''; solutions.default = { @@ -43,6 +47,7 @@ resholve.mkDerivation (finalAttrs: { inputs = [ coreutils curl + gawk gnugrep gnused iproute2 @@ -59,7 +64,7 @@ resholve.mkDerivation (finalAttrs: { meta = { description = "NordVPN Wireguard (NordLynx) client in POSIX shell"; homepage = "https://github.com/phirecc/wgnord"; - maintainers = [ ]; + maintainers = with lib.maintainers; [ novalkun ]; license = lib.licenses.mit; mainProgram = "wgnord"; platforms = lib.platforms.linux;