this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fluxer git canary + screencast patch

roufpup 8f4fd413 39f351f8

+88 -18
+50 -18
packages/fluxer/default.nix
··· 28 28 lib, 29 29 libGL, 30 30 writeText, 31 + electron_40, 32 + fetchPnpmDeps, 33 + pnpmConfigHook, 34 + pnpm, 35 + nodejs, 36 + python3, 37 + esbuild, 38 + fetchFromGitHub, 31 39 ... 32 40 }: 33 - stdenv.mkDerivation { 41 + stdenv.mkDerivation rec { 34 42 pname = "fluxer"; 35 - version = "0.0.8"; 43 + version = "1.0.0-canary"; 36 44 37 - src = builtins.fetchurl { 38 - url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/fluxer-stable-0.0.8-x64.tar.gz"; 39 - }; 45 + src = "${ 46 + fetchFromGitHub { 47 + owner = "fluxerapp"; 48 + repo = "fluxer"; 49 + rev = "canary"; 50 + sha256 = "sha256-7en5pENPCP9g4Bm+WXEKcIVb1kf28H1KlPmeHkX9LNM="; 51 + } 52 + }/fluxer_app"; 53 + 54 + patches = [ ../../patches/screencast.patch ]; 40 55 41 56 nativeBuildInputs = [ 42 57 autoPatchelfHook 43 58 makeWrapper 59 + pnpmConfigHook 60 + pnpm 61 + nodejs 62 + python3 63 + esbuild 64 + ]; 65 + 66 + pnpmDeps = fetchPnpmDeps { 67 + inherit pname version src; 68 + fetcherVersion = 3; 69 + hash = "sha256-zJTjNfNWMhQtEwY1lik2H9xMf4lJ6GLg6PShva7IDjs="; 70 + }; 71 + 72 + pnpmInstallFlags = [ 73 + "--frozen-lockfile" 44 74 ]; 45 75 46 76 buildInputs = [ ··· 70 100 ]; 71 101 72 102 installPhase = '' 73 - mkdir -p $out/runtime 103 + export BUILD_CHANNEL="canary" 104 + pnpm run electron:compile 105 + 106 + pnpm exec electron-builder --config electron-builder.config.cjs --linux \ 107 + --dir \ 108 + -c.electronDist=${electron_40}/libexec/electron \ 109 + -c.electronVersion=${electron_40.version} \ 110 + -c.npmRebuild=false 111 + 112 + mkdir -p $out/share/fluxer 74 113 mkdir -p $out/bin 75 114 76 - cp -r ./* $out/runtime 77 - ls -la $out/runtime 78 - ln -sf $out/runtime/fluxer $out/bin/fluxer 115 + cp -r ./dist-electron/linux-unpacked/resources/* $out/share/fluxer 79 116 80 - wrapProgram $out/bin/fluxer \ 81 - --prefix LD_LIBRARY_PATH : ${ 82 - lib.makeLibraryPath [ 83 - libGL 84 - ] 85 - } 117 + makeWrapper ${electron_40}/bin/electron $out/bin/fluxer \ 118 + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \ 119 + --add-flags "$out/share/fluxer/app.asar" 86 120 87 121 mkdir -p $out/share/applications/ 88 122 substitute ${writeText "fluxer.desktop" '' ··· 97 131 StartupWMClass=fluxer 98 132 ''} $out/share/applications/fluxer.desktop --subst-var out 99 133 100 - 101 - 102 134 mkdir -p $out/share/icons/hicolor/512x512/ 103 - cp $out/runtime/resources/512x512.png $out/share/icons/hicolor/512x512/fluxer.png 135 + cp $out/share/fluxer/512x512.png $out/share/icons/hicolor/512x512/fluxer.png 104 136 ''; 105 137 }
+38
patches/screencast.patch
··· 1 + diff --git a/src-electron/main/window.ts b/src-electron/main/window.ts 2 + index 284db57..9b0bc5f 100644 3 + --- a/src-electron/main/window.ts 4 + +++ b/src-electron/main/window.ts 5 + @@ -102,6 +102,28 @@ let displayMediaRequestCounter = 0; 6 + 7 + function setupDisplayMediaHandler(session: Electron.Session, webContents: Electron.WebContents): void { 8 + session.setDisplayMediaRequestHandler((request, callback) => { 9 + + const isWayland = process.platform === 'linux' && 10 + + (process.env.WAYLAND_DISPLAY || process.env.XDG_SESSION_TYPE === 'wayland'); 11 + + 12 + + if (isWayland) { 13 + + try { 14 + + desktopCapturer.getSources({ types: ['screen', 'window'] }).then((sources) => { 15 + + const selected_source = sources[0]; 16 + + if (selected_source) { 17 + + log.info('[DisplayMedia] Wayland native portal source selected'); 18 + + callback({ video: selected_source } as unknown as Electron.Streams); 19 + + } else { 20 + + log.info('[DisplayMedia] Wayland native portal cancelled by user'); 21 + + callback(null as unknown as Electron.Streams); 22 + + } 23 + + }) 24 + + } catch (e){ 25 + + log.error('[DisplayMedia] Wayland source capture failed:', e); 26 + + callback(null as unknown as Electron.Streams); 27 + + } 28 + + return; 29 + + } 30 + + 31 + const requestId = `display-media-${++displayMediaRequestCounter}`; 32 + const requestCallback = (streams: Electron.Streams | null) => callback(streams as Electron.Streams); 33 + pendingDisplayMediaRequests.set(requestId, {callback: requestCallback}); 34 + @@ -608,3 +630,4 @@ export function hideWindow(): void { 35 + export function setQuitting(quitting: boolean): void { 36 + isQuitting = quitting; 37 + } 38 + +