biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / video / electronplayer / electronplayer.nix
blob270d5543c9939afb525a2a3e340d2822d8836c59
1 { appimageTools, lib, fetchurl }:
2 let
3   pname = "electronplayer";
4   version = "2.0.8";
5   name = "${pname}-${version}";
7   #TODO: remove the -rc4 from the tag in the url when possible
8   src = fetchurl {
9     url = "https://github.com/oscartbeaumont/ElectronPlayer/releases/download/v${version}-rc4/${name}.AppImage";
10     sha256 = "wAsmSFdbRPnYnDyWQSbtyj+GLJLN7ibksUE7cegfkhI=";
11   };
13   appimageContents = appimageTools.extractType2 { inherit name src; };
14 in appimageTools.wrapType2 {
15   inherit name src;
17   extraInstallCommands = ''
18     mv $out/bin/${name} $out/bin/${pname}
20     install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
21     substituteInPlace $out/share/applications/${pname}.desktop \
22       --replace 'Exec=AppRun' 'Exec=ElectronPlayer'
23     cp -r ${appimageContents}/usr/share/icons $out/share
24   '';
26   meta = with lib; {
27     description = "An electron based web video services player";
28     mainProgram = "electronplayer";
29     homepage = "https://github.com/oscartbeaumont/ElectronPlayer";
30     license = licenses.mit;
31     maintainers = with maintainers; [ extends ];
32     platforms = [ "x86_64-linux" ];
33   };