Merge pull request #264084 from kirillrdy/freetube
freetube: fix build, use latest electron
This commit is contained in:
commit
4db9219553
3 changed files with 47 additions and 4 deletions
|
@ -306,6 +306,7 @@ in {
|
|||
forgejo = handleTest ./forgejo.nix { };
|
||||
freenet = handleTest ./freenet.nix {};
|
||||
freeswitch = handleTest ./freeswitch.nix {};
|
||||
freetube = discoverTests (import ./freetube.nix);
|
||||
freshrss-sqlite = handleTest ./freshrss-sqlite.nix {};
|
||||
freshrss-pgsql = handleTest ./freshrss-pgsql.nix {};
|
||||
frigate = handleTest ./frigate.nix {};
|
||||
|
|
41
nixos/tests/freetube.nix
Normal file
41
nixos/tests/freetube.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
let
|
||||
tests = {
|
||||
wayland = { pkgs, ... }: {
|
||||
imports = [ ./common/wayland-cage.nix ];
|
||||
services.cage.program = "${pkgs.freetube}/bin/freetube";
|
||||
virtualisation.memorySize = 2047;
|
||||
environment.variables.NIXOS_OZONE_WL = "1";
|
||||
environment.variables.DISPLAY = "do not use";
|
||||
};
|
||||
xorg = { pkgs, ... }: {
|
||||
imports = [ ./common/user-account.nix ./common/x11.nix ];
|
||||
virtualisation.memorySize = 2047;
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${pkgs.freetube}/bin/freetube
|
||||
'';
|
||||
test-support.displayManager.auto.user = "alice";
|
||||
};
|
||||
};
|
||||
|
||||
mkTest = name: machine:
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
inherit name;
|
||||
nodes = { "${name}" = machine; };
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ kirillrdy ];
|
||||
enableOCR = true;
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit('graphical.target')
|
||||
machine.wait_for_text('Your Subscription list is currently empty')
|
||||
machine.send_key("ctrl-r")
|
||||
machine.wait_for_text('Your Subscription list is currently empty')
|
||||
machine.screenshot("main.png")
|
||||
machine.send_key("ctrl-comma")
|
||||
machine.wait_for_text('General Settings', timeout=30)
|
||||
machine.screenshot("preferences.png")
|
||||
'';
|
||||
});
|
||||
in
|
||||
builtins.mapAttrs (k: v: mkTest k v { }) tests
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, lib, fetchurl, appimageTools, makeWrapper, electron_22 }:
|
||||
{ stdenv, lib, fetchurl, appimageTools, makeWrapper, electron, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "freetube";
|
||||
|
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "add96ad3509d4d5c6d8658b005dfd046963cd6bb0a4e1f3e88f726a86c05810f";
|
||||
};
|
||||
|
||||
passthru.tests = nixosTests.freetube;
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
name = "${pname}-${version}";
|
||||
inherit src;
|
||||
|
@ -35,9 +37,8 @@ stdenv.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Electron version is set to 22 in order to match upstream
|
||||
postFixup = ''
|
||||
makeWrapper ${electron_22}/bin/electron $out/bin/${pname} \
|
||||
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
|
||||
--add-flags $out/share/${pname}/resources/app.asar
|
||||
'';
|
||||
|
||||
|
@ -46,6 +47,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = "https://freetubeapp.io/";
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = with maintainers; [ ryneeverett alyaeanyx ];
|
||||
inherit (electron_22.meta) platforms;
|
||||
inherit (electron.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue