depot/third_party/nixpkgs/pkgs/applications/video/lbry/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
1.6 KiB
Nix

{ lib, fetchurl, appimageTools}:
appimageTools.wrapAppImage rec {
pname = "lbry-desktop";
version = "0.53.9";
# Fetch from GitHub Releases and extract
src = appimageTools.extract {
inherit pname version;
src = fetchurl {
url = "https://github.com/lbryio/lbry-desktop/releases/download/v${version}/LBRY_${version}.AppImage";
# Gotten from latest-linux.yml
hash = "sha256-FkqIazE4eIEobYRBstXfPWh6MTCaNcCLk14yDGC4rRk=";
};
};
# At runtime, Lbry likes to have access to Ffmpeg
extraPkgs = pkgs: [ pkgs.ffmpeg ];
# General fixup
extraInstallCommands = ''
# Firstly, rename the executable to lbry for convinence
mv $out/bin/${pname} $out/bin/lbry
# Now, install assets such as the desktop file and icons
install -m 444 -D ${src}/lbry.desktop -t $out/share/applications
substituteInPlace $out/share/applications/lbry.desktop \
--replace 'Exec=AppRun' 'Exec=lbry'
cp -r ${src}/usr/share/icons $out/share
'';
meta = with lib; {
description = "Browser and wallet for LBRY, the decentralized, user-controlled content marketplace";
longDescription = ''
The LBRY app is a graphical browser for the decentralized content marketplace provided by the LBRY protocol.
It is essentially the lbry daemon bundled with a UI using Electron.
'';
license = licenses.mit;
homepage = "https://lbry.com/";
downloadPage = "https://lbry.com/get/";
changelog = "https://github.com/lbryio/lbry-desktop/blob/master/CHANGELOG.md";
maintainers = with maintainers; [ enderger ];
platforms = [ "x86_64-linux" ];
mainProgram = "lbry";
};
}