-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
70 lines (58 loc) · 1.44 KB
/
Copy pathdefault.nix
File metadata and controls
70 lines (58 loc) · 1.44 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
{ lib
, stdenv
, python3
, makeWrapper
, miraclecast
, wpa_supplicant
, gstreamer
, gst_all_1
, gnome-network-displays
, mpv
, networkmanager
, avahi
, systemd
}:
stdenv.mkDerivation rec {
pname = "mirai";
version = "0.1.0";
src = ./.;
nativeBuildInputs = [ makeWrapper python3 ];
propagatedBuildInputs = [
python3
python3.pkgs.dbus-python
miraclecast
wpa_supplicant
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-libav
gnome-network-displays
mpv
networkmanager
avahi
systemd
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib/mirai $out/share/mirai/quickshell
cp -r mirai/* $out/lib/mirai/
cp -r quickshell/* $out/share/mirai/quickshell/
install -Dm755 bin/mirai $out/bin/mirai
install -Dm644 systemd/mirai.service $out/lib/systemd/system/mirai.service
substituteInPlace $out/bin/mirai \
--replace "exec python3 -m mirai" "exec ${python3}/bin/python3 -m mirai"
wrapProgram $out/bin/mirai \
--prefix PYTHONPATH : "$out/lib" \
--prefix PATH : "${lib.makeBinPath propagatedBuildInputs}"
runHook postInstall
'';
meta = with lib; {
description = "Miracast daemon and CLI for Linux";
homepage = "https://github.com/Leriart/Mirai";
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}