From a80d56eea2945d891f752e9d187b9975a1ac0c47 Mon Sep 17 00:00:00 2001 From: Devan Carpenter Date: Mon, 11 Aug 2025 18:37:22 -0500 Subject: [PATCH 1/2] vors: 3.1.0 -> 5.0.0 updateScript was not working due to a URL change, so that is fixed in this commit. I also took the opportunity to move to buildGoModule. --- pkgs/by-name/vo/vors/package.nix | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/vo/vors/package.nix b/pkgs/by-name/vo/vors/package.nix index b8c6dc90f9e5..4852cde0a6fa 100644 --- a/pkgs/by-name/vo/vors/package.nix +++ b/pkgs/by-name/vo/vors/package.nix @@ -11,21 +11,24 @@ pkg-config, opusfile, sox, + libogg, makeWrapper, + buildGoModule, }: -stdenv.mkDerivation (finalAttrs: { +buildGoModule (finalAttrs: { pname = "vors"; - version = "3.1.0"; + version = "5.0.0"; src = fetchurl { url = "http://www.vors.stargrave.org/download/vors-${finalAttrs.version}.tar.zst"; - hash = "sha256-ZRQI96j0n00eh1qxO8NgJeOQPU9bfzHoHa45xQNuzv8="; + hash = "sha256-DpwnhfexF/yw2emn1xrhKbGNbk9Z6wm5A2azQSAdmpA="; }; + vendorHash = null; buildInputs = [ - go opusfile + libogg sox ]; @@ -36,21 +39,26 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper ]; + subPackages = [ + "cmd/vad" + "cmd/keygen" + "cmd/server" + "cmd/client" + ]; + preConfigure = "export GOCACHE=$NIX_BUILD_TOP/gocache"; - buildPhase = '' - runHook preBuild + preBuild = '' ./mk-non-static mkdir -p ./local/lib # Required to prevent building libopusfile - ./build - runHook postBuild ''; installPhase = '' runHook preInstall - mkdir -p "$out"/bin - cp -f bin/* "$out"/bin - chmod 755 "$out"/bin/* + install -Dm755 "$GOPATH"/bin/client "$out"/bin/vors-client + install -Dm755 "$GOPATH"/bin/keygen "$out"/bin/vors-keygen + install -Dm755 "$GOPATH"/bin/server "$out"/bin/vors-server + install -Dm755 "$GOPATH"/bin/vad "$out"/bin/vors-vad runHook postInstall ''; @@ -70,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { broken = stdenv.hostPlatform.isDarwin; description = "Very simple and usable multi-user VoIP solution"; - downloadPage = "http://www.vors.stargrave.org/Install.html"; + downloadPage = "http://www.vors.stargrave.org/INSTALL.html"; homepage = "http://www.vors.stargrave.org/"; license = lib.licenses.gpl3Only; longDescription = '' From c7922c88d4089da43983b90b65c1657f4b60f138 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 13 Aug 2025 18:49:18 +0300 Subject: [PATCH 2/2] vors: Sort all inputs --- pkgs/by-name/vo/vors/package.nix | 33 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/vo/vors/package.nix b/pkgs/by-name/vo/vors/package.nix index 4852cde0a6fa..c45192b2e6e5 100644 --- a/pkgs/by-name/vo/vors/package.nix +++ b/pkgs/by-name/vo/vors/package.nix @@ -1,19 +1,24 @@ { - curl, - fetchurl, lib, - genericUpdater, - go, - perl, stdenv, - writeShellScript, - zstd, - pkg-config, + buildGoModule, + fetchurl, + + # buildInputs + libogg, opusfile, sox, - libogg, + + # nativeBuildInputs makeWrapper, - buildGoModule, + perl, + pkg-config, + zstd, + + # updateScript + curl, + genericUpdater, + writeShellScript, }: buildGoModule (finalAttrs: { @@ -27,16 +32,16 @@ buildGoModule (finalAttrs: { vendorHash = null; buildInputs = [ - opusfile libogg + opusfile sox ]; nativeBuildInputs = [ - zstd - pkg-config - perl makeWrapper + perl + pkg-config + zstd ]; subPackages = [