Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
93 lines (87 loc) · 2.74 KB
/
Copy pathflake.nix
File metadata and controls
93 lines (87 loc) · 2.74 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
{
description = "LinuxPlay — low-latency remote desktop for Linux";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (s: f nixpkgs.legacyPackages.${s});
in
{
packages = forAllSystems (pkgs:
let
gst = pkgs.gst_all_1;
# GStreamer plugins the binaries load at runtime (capture, codecs,
# audio). The wrapper below puts them on GST_PLUGIN_SYSTEM_PATH.
gstPlugins = [
gst.gstreamer
gst.gst-plugins-base
gst.gst-plugins-good
gst.gst-plugins-bad
gst.gst-plugins-ugly
gst.gst-libav
pkgs.pipewire
];
in
rec {
linuxplay = pkgs.rustPlatform.buildRustPackage {
pname = "linuxplay";
version = "2.0.0-dev";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = with pkgs; [
pkg-config
cmake
wrapGAppsHook4
rustPlatform.bindgenHook
];
buildInputs = with pkgs; [
gtk4
libadwaita
gst.gstreamer
gst.gst-plugins-base
libGL
];
# Make the runtime GStreamer plugins discoverable.
postFixup = ''
for bin in $out/bin/linuxplay $out/bin/linuxplay-host; do
[ -e "$bin" ] || continue
wrapProgram "$bin" \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : \
"${pkgs.lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gstPlugins}"
done
'';
meta = with pkgs.lib; {
description = "Low-latency remote desktop for Linux (WebRTC + GStreamer)";
homepage = "https://github.com/Techlm77/LinuxPlay";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
};
default = linuxplay;
});
devShells = forAllSystems (pkgs:
let gst = pkgs.gst_all_1; in
{
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo
rustc
pkg-config
cmake
rustPlatform.bindgenHook
];
buildInputs = with pkgs; [
gtk4
libadwaita
gst.gstreamer
gst.gst-plugins-base
gst.gst-plugins-good
gst.gst-plugins-bad
gst.gst-libav
pkgs.pipewire
libGL
];
};
});
};
}