-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
71 lines (62 loc) · 1.94 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "Nix environment for development.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
};
outputs = inputs@{ nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; }
{
imports = [
inputs.flake-root.flakeModule
];
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
perSystem = { pkgs, lib, config, ... }: {
devShells.default = pkgs.mkShell rec {
inputsFrom = [ config.flake-root.devShell ];
name = "exchange";
# dev tools
nativeBuildInputs = with pkgs; [
meson # build system
ninja # build system
cmake # build system
pkg-config # packages finder
valgrind # memory profiler
gdb # GNU debugger
cargo # rust build system
rustPlatform.bindgenHook # rust bindgen
];
# libraries
buildInputs = with pkgs; [
llvmPackages.libclang.lib # clang lib
zlib # compression lib
criterion # unit test framework
cjson # JSON parsing
# for uwebsockets
libstdcxx5
libuv
# lib for dixous (desktop app)
openssl
glib
cairo
pango
atk
gdk-pixbuf
libsoup
gtk3
libappindicator
webkitgtk_4_1
];
shellHook = ''
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
export LD_LIBRARY_PATH="$FLAKE_ROOT/orderbook/build:${pkgs.lib.makeLibraryPath buildInputs}:$LD_LIBRARY_PATH"
'';
};
};
};
}