nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchurl,
4 appimageTools,
5}:
6
7appimageTools.wrapAppImage rec {
8 pname = "lbry-desktop";
9 version = "0.53.9";
10
11 # Fetch from GitHub Releases and extract
12 src = appimageTools.extract {
13 inherit pname version;
14 src = fetchurl {
15 url = "https://github.com/lbryio/lbry-desktop/releases/download/v${version}/LBRY_${version}.AppImage";
16 # Gotten from latest-linux.yml
17 hash = "sha256-FkqIazE4eIEobYRBstXfPWh6MTCaNcCLk14yDGC4rRk=";
18 };
19 };
20
21 # At runtime, Lbry likes to have access to Ffmpeg
22 extraPkgs = pkgs: [ pkgs.ffmpeg ];
23
24 # General fixup
25 extraInstallCommands = ''
26 # Firstly, rename the executable to lbry for convinence
27 mv $out/bin/${pname} $out/bin/lbry
28
29 # Now, install assets such as the desktop file and icons
30 install -m 444 -D ${src}/lbry.desktop -t $out/share/applications
31 substituteInPlace $out/share/applications/lbry.desktop \
32 --replace 'Exec=AppRun' 'Exec=lbry'
33 cp -r ${src}/usr/share/icons $out/share
34 '';
35
36 meta = {
37 description = "Browser and wallet for LBRY, the decentralized, user-controlled content marketplace";
38 longDescription = ''
39 The LBRY app is a graphical browser for the decentralized content marketplace provided by the LBRY protocol.
40 It is essentially the lbry daemon bundled with a UI using Electron.
41 '';
42 license = lib.licenses.mit;
43 homepage = "https://lbry.com/";
44 downloadPage = "https://lbry.com/get/";
45 changelog = "https://github.com/lbryio/lbry-desktop/blob/master/CHANGELOG.md";
46 maintainers = with lib.maintainers; [ enderger ];
47 platforms = [ "x86_64-linux" ];
48 mainProgram = "lbry";
49 };
50}