This repository was archived by the owner on Nov 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
107 lines (101 loc) · 2.92 KB
/
flake.nix
File metadata and controls
107 lines (101 loc) · 2.92 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
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
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.rust-bin.nightly.latest.complete.override {
targets = [
"aarch64-unknown-linux-gnu"
"x86_64-unknown-linux-gnu"
];
};
releaseRustToolchain = (pkgs.rust-bin.fromRustupToolchain { channel = "1.89.0"; });
in
let
nativeBuildInputs = with pkgs; [
pkg-config
clang
dig
graphviz
rustToolchain
graphviz
slint-lsp
heaptrack
slint-viewer
wrapGAppsHook3
];
buildInputs = with pkgs; [
libGL
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
xorg.libxcb
pipewire
alsa-lib
libclang
dbus
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-rs
gst_all_1.gst-rtsp-server
gst_all_1.gst-libav
glib
openssl
libnice
fontconfig
freetype
vulkan-loader
# KMS:
seatd
libgbm
systemdLibs
libinput
];
newRustPlatform = pkgs.makeRustPlatform {
cargo = releaseRustToolchain;
rustc = releaseRustToolchain;
};
in
let
receiver = newRustPlatform.buildRustPackage {
pname = "openmirroring";
version = "0.1.0";
src = ./.;
cargoBuildFlags = "-p receiver";
cargoHash = "sha256-z2B46oM1Q0qDuyGmWScNJnQeaQXZDEMKSpn1zrOATaA=";
inherit buildInputs nativeBuildInputs;
};
in rec
{
devShells.default = pkgs.mkShell {
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
BINDGEN_EXTRA_CLANG_ARGS = [
''-I"${pkgs.llvmPackages.libclang.lib}/lib/clang/${pkgs.llvmPackages.libclang.version}/include"''
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
inherit buildInputs nativeBuildInputs;
};
packages = {
default = receiver;
};
}
);
}