Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

73 lines
2.2 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
pkg-config,
gobject-introspection,
blueprint-compiler,
wrapGAppsHook4,
libadwaita,
}:
buildGoModule rec {
pname = "multiplex";
version = "0.1.7";
src = fetchFromGitHub {
owner = "pojntfx";
repo = "multiplex";
rev = "v${version}";
hash = "sha256-+KvFBzoIYmSbuazstJae8lC0xdPtXLhFWawlc+iGGoU=";
};
vendorHash = "sha256-a99zmJ89QN+bf1WgAin+Eoqaizb7vyesb4uxt5L8qNY=";
nativeBuildInputs = [
pkg-config
gobject-introspection
blueprint-compiler
wrapGAppsHook4
];
buildInputs = [ libadwaita ];
# generate files requested by go:generate
# don't generate in goModules because buildInputs isn't available
preBuild = ''
if [[ ! $name == *"-go-modules" ]]; then
go generate ./internal/resources/resources.go
fi
'';
postInstall = ''
install -Dm644 -t $out/share/applications com.pojtinger.felicitas.Multiplex.desktop
install -Dm644 -t $out/share/metainfo internal/resources/com.pojtinger.felicitas.Multiplex.metainfo.xml
# The provided pixmap icons appears to be a bit blurry so not installing them
install -Dm644 docs/icon.svg $out/share/icons/hicolor/scalable/apps/com.pojtinger.felicitas.Multiplex.svg
install -Dm644 docs/icon-symbolic.svg $out/share/icons/hicolor/symbolic/apps/com.pojtinger.felicitas.Multiplex-symbolic.svg
'';
meta = {
description = "Watch torrents with your friends";
longDescription = ''
Multiplex is an app to watch torrents together, providing an experience similar
to Apple's SharePlay and Amazon's Prime Video Watch Party.
It enables you to:
- Stream any file directly using a wide range of video and audio formats with
the mpv video player.
- Host online watch parties while preserving your privacy by synchronizing
video playback with friends without a central server using weron.
- Bypass internet restrictions by optionally separating the hTorrent HTTP to
BitTorrent gateway and user interface into two separate components.
'';
homepage = "https://github.com/pojntfx/multiplex";
license = with lib.licenses; [
agpl3Plus
cc0
];
mainProgram = "multiplex";
maintainers = with lib.maintainers; [ aleksana ];
};
}