nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 pkg-config,
6 gobject-introspection,
7 blueprint-compiler,
8 wrapGAppsHook4,
9 libadwaita,
10}:
11
12buildGoModule rec {
13 pname = "multiplex";
14 version = "0.1.7";
15
16 src = fetchFromGitHub {
17 owner = "pojntfx";
18 repo = "multiplex";
19 rev = "v${version}";
20 hash = "sha256-+KvFBzoIYmSbuazstJae8lC0xdPtXLhFWawlc+iGGoU=";
21 };
22
23 vendorHash = "sha256-a99zmJ89QN+bf1WgAin+Eoqaizb7vyesb4uxt5L8qNY=";
24
25 nativeBuildInputs = [
26 pkg-config
27 gobject-introspection
28 blueprint-compiler
29 wrapGAppsHook4
30 ];
31
32 buildInputs = [ libadwaita ];
33
34 # generate files requested by go:generate
35 # don't generate in goModules because buildInputs isn't available
36 preBuild = ''
37 if [[ ! $name == *"-go-modules" ]]; then
38 go generate ./internal/resources/resources.go
39 fi
40 '';
41
42 postInstall = ''
43 install -Dm644 -t $out/share/applications com.pojtinger.felicitas.Multiplex.desktop
44 install -Dm644 -t $out/share/metainfo internal/resources/com.pojtinger.felicitas.Multiplex.metainfo.xml
45 # The provided pixmap icons appears to be a bit blurry so not installing them
46 install -Dm644 docs/icon.svg $out/share/icons/hicolor/scalable/apps/com.pojtinger.felicitas.Multiplex.svg
47 install -Dm644 docs/icon-symbolic.svg $out/share/icons/hicolor/symbolic/apps/com.pojtinger.felicitas.Multiplex-symbolic.svg
48 '';
49
50 meta = {
51 description = "Watch torrents with your friends";
52 longDescription = ''
53 Multiplex is an app to watch torrents together, providing an experience similar
54 to Apple's SharePlay and Amazon's Prime Video Watch Party.
55
56 It enables you to:
57 - Stream any file directly using a wide range of video and audio formats with
58 the mpv video player.
59 - Host online watch parties while preserving your privacy by synchronizing
60 video playback with friends without a central server using weron.
61 - Bypass internet restrictions by optionally separating the hTorrent HTTP to
62 BitTorrent gateway and user interface into two separate components.
63 '';
64 homepage = "https://github.com/pojntfx/multiplex";
65 license = with lib.licenses; [
66 agpl3Plus
67 cc0
68 ];
69 mainProgram = "multiplex";
70 maintainers = with lib.maintainers; [ aleksana ];
71 };
72}