2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, ninja, go, protobuf, openssl }:
|
2020-12-17 02:19:25 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "GameNetworkingSockets";
|
2022-07-02 08:57:13 +00:00
|
|
|
version = "1.4.1";
|
2020-12-17 02:19:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ValveSoftware";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-07-02 08:57:13 +00:00
|
|
|
sha256 = "12741wmpvy7mcvqqmjg4a7ph75rwliwgclhk4imjijqf2qkvsphd";
|
2020-12-17 02:19:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja go ];
|
|
|
|
|
|
|
|
cmakeFlags = [ "-G Ninja" ];
|
|
|
|
|
|
|
|
# tmp home for go
|
|
|
|
preBuild = "export HOME=\"$TMPDIR\"";
|
|
|
|
|
2021-10-17 12:07:55 +00:00
|
|
|
buildInputs = [ protobuf ];
|
|
|
|
propagatedBuildInputs = [ openssl ];
|
2020-12-17 02:19:25 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-12-17 02:19:25 +00:00
|
|
|
description = "GameNetworkingSockets is a basic transport layer for games";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|