-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
33 lines (33 loc) · 1.11 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
description = "Valve GameNetworkingSockets Wrapper";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
in with pkgs;
let
rust-nightly = rust-bin.nightly.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
};
in rec {
devShell = mkShell {
buildInputs = [ rust-nightly clang_15 openssl protobuf abseil-cpp_202401 pkg-config ];
PROTOC = "${protobuf}/bin/protoc";
LIBCLANG_PATH = "${llvmPackages_15.libclang.lib}/lib";
LD_LIBRARY_PATH =
lib.makeLibraryPath [ clang15Stdenv.cc.cc.lib openssl protobuf abseil-cpp_202401 ];
CPLUS_INCLUDE_PATH = "${openssl.dev}/include";
};
});
}