Merge pull request #109036 from ryneeverett/freetube-init

This commit is contained in:
Sandro 2021-03-22 01:42:27 +01:00 committed by GitHub
commit 0263b16742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{ stdenv, lib, fetchurl, appimageTools, makeWrapper, electron }:
stdenv.mkDerivation rec {
pname = "freetube";
version = "0.12.0";
src = fetchurl {
url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${version}-beta/freetube_${version}_amd64.AppImage";
sha256 = "151fcm1swsasrwzm93fddx669q4xlfl3d58q1w58nyv7r6kh4fda";
};
appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname} $out/share/applications
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/freetube.desktop $out/share/applications/${pname}.desktop
cp -a ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
runHook postInstall
'';
postFixup = ''
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app.asar
'';
meta = with lib; {
description = "An Open Source YouTube app for privacy";
homepage = "https://freetubeapp.io/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ ryneeverett ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -4475,6 +4475,8 @@ in
freetds = callPackage ../development/libraries/freetds { };
freetube = callPackage ../applications/video/freetube { };
freqtweak = callPackage ../applications/audio/freqtweak {
wxGTK = wxGTK31-gtk2;
};