From 46b7ee4769e8412ee9999dde023b14d2267e1a4d Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Mon, 11 Jan 2021 17:20:15 +0000 Subject: [PATCH] freetube: init at 0.12.0 --- pkgs/applications/video/freetube/default.nix | 50 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/applications/video/freetube/default.nix diff --git a/pkgs/applications/video/freetube/default.nix b/pkgs/applications/video/freetube/default.nix new file mode 100644 index 000000000000..a5de2142d777 --- /dev/null +++ b/pkgs/applications/video/freetube/default.nix @@ -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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19d5b9260f6c..d2cedb66926f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4134,6 +4134,8 @@ in freetds = callPackage ../development/libraries/freetds { }; + freetube = callPackage ../applications/video/freetube { }; + freqtweak = callPackage ../applications/audio/freqtweak { wxGTK = wxGTK31-gtk2; };