diff --git a/pkgs/by-name/yo/yojimbo/package.nix b/pkgs/by-name/yo/yojimbo/package.nix index a89e356752a0..287de4a052bc 100644 --- a/pkgs/by-name/yo/yojimbo/package.nix +++ b/pkgs/by-name/yo/yojimbo/package.nix @@ -6,18 +6,18 @@ doxygen, libsodium, mbedtls_2, + nix-update-script, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "yojimbo"; - version = "1.1"; + version = "1.2.3"; src = fetchFromGitHub { - owner = "networkprotocol"; + owner = "mas-bandwidth"; repo = "yojimbo"; - rev = "e02219c102d9b440290539036992d77608eab3b0"; - sha256 = "0jn25ddv73hwjals883a910m66kwj6glxxhnmn96bpzsvsaimnkr"; - fetchSubmodules = true; + tag = "v${finalAttrs.version}"; + sha256 = "sha256-GMYkWQTwHm7fGRSTIt2phv01CjEcw0l4iPQD4uTQ5yM="; }; nativeBuildInputs = [ @@ -29,19 +29,28 @@ stdenv.mkDerivation { mbedtls_2 ]; + patches = [ + # https://github.com/mas-bandwidth/serialize/pull/6 + ./silence-uninitialized-warning.patch + ]; + postBuild = '' - premake5 docs + doxygen doxygen.config ''; installPhase = '' - install -Dm555 -t $out/lib bin/libyojimbo.a - install -Dm444 -t $out/include yojimbo.h + install -Dm755 -t $out/lib bin/libyojimbo.a + cp -r -t $out include mkdir -p $out/share/doc/yojimbo cp -r docs/html $out/share/doc/yojimbo ''; doCheck = true; + enableParallelBuilding = true; + + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Network library for client/server games with dedicated servers"; longDescription = '' @@ -49,9 +58,9 @@ stdenv.mkDerivation { It's designed around the networking requirements of competitive multiplayer games like first person shooters. As such it provides a time critical networking layer on top of UDP, with a client/server architecture supporting up to 64 players per-dedicated server instance. ''; - homepage = "https://github.com/networkprotocol/yojimbo"; + homepage = "https://github.com/mas-bandwidth/yojimbo"; license = licenses.bsd3; platforms = platforms.x86_64; maintainers = with maintainers; [ paddygord ]; }; -} +}) diff --git a/pkgs/by-name/yo/yojimbo/silence-uninitialized-warning.patch b/pkgs/by-name/yo/yojimbo/silence-uninitialized-warning.patch new file mode 100644 index 000000000000..d90b7af06114 --- /dev/null +++ b/pkgs/by-name/yo/yojimbo/silence-uninitialized-warning.patch @@ -0,0 +1,13 @@ +diff --git a/serialize.h b/serialize.h +index 6e977ac..4d7413d 100644 +--- a/serialize/serialize.h ++++ b/serialize/serialize.h +@@ -1400,7 +1400,7 @@ namespace serialize + + template bool serialize_float_internal( Stream & stream, float & value ) + { +- uint32_t int_value; ++ uint32_t int_value = 0; + if ( Stream::IsWriting ) + { + memcpy( (char*) &int_value, &value, 4 );