diff --git a/pkgs/by-name/vo/vors/package.nix b/pkgs/by-name/vo/vors/package.nix index b8c6dc90f9e5..c45192b2e6e5 100644 --- a/pkgs/by-name/vo/vors/package.nix +++ b/pkgs/by-name/vo/vors/package.nix @@ -1,56 +1,69 @@ { - curl, - fetchurl, lib, - genericUpdater, - go, - perl, stdenv, - writeShellScript, - zstd, - pkg-config, + buildGoModule, + fetchurl, + + # buildInputs + libogg, opusfile, sox, + + # nativeBuildInputs makeWrapper, + perl, + pkg-config, + zstd, + + # updateScript + curl, + genericUpdater, + writeShellScript, }: -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 + libogg opusfile sox ]; nativeBuildInputs = [ - zstd - pkg-config - perl makeWrapper + perl + pkg-config + zstd + ]; + + 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 +83,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 = ''