test build
This commit is contained in:
32
flake.nix
32
flake.nix
@@ -25,6 +25,38 @@
|
|||||||
Modules = {
|
Modules = {
|
||||||
examples = import ./ExampleModules.nix { inherit inputs; inherit pkgs; };
|
examples = import ./ExampleModules.nix { inherit inputs; inherit pkgs; };
|
||||||
|
|
||||||
|
NetworkingModule = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
|
||||||
|
name = "NetworkingModule";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
clang
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
gamenetworkingsockets
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
clang++ \
|
||||||
|
modules/NetworkingModule/src/*.cpp \
|
||||||
|
-fpic -shared \
|
||||||
|
-I src -I include \
|
||||||
|
-DNETWORKINGMODULE_DYNAMIC \
|
||||||
|
-lGameNetworkingSockets
|
||||||
|
-lGL -lglfw -lGLEW \
|
||||||
|
-Wall \
|
||||||
|
-o $name
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp $name $out/bin
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
WindowModule = pkgs.stdenvNoCC.mkDerivation {
|
WindowModule = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
|
||||||
name = "WindowModule";
|
name = "WindowModule";
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "Archimedes.h"
|
#include "Archimedes.h"
|
||||||
|
|
||||||
|
#include <steam/steamnetworkingsockets.h>
|
||||||
|
#include <steam/isteamnetworkingutils.h>
|
||||||
|
|
||||||
class NetworkingModule : public Archimedes::Module {
|
class NetworkingModule : public Archimedes::Module {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user