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;