Skip to content

Commit 01c7fcf

Browse files
authored
xpra: html5 + systemd support (#392598)
2 parents 1038e39 + 2c7ec00 commit 01c7fcf

File tree

2 files changed

+68
-16
lines changed

2 files changed

+68
-16
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
stdenvNoCC,
5+
python3,
6+
uglify-js,
7+
gitUpdater,
8+
}:
9+
stdenvNoCC.mkDerivation (finalAttrs: {
10+
name = "xpra-html5";
11+
version = "17";
12+
13+
src = fetchFromGitHub {
14+
owner = "Xpra-org";
15+
repo = "xpra-html5";
16+
tag = "v${finalAttrs.version}";
17+
hash = "sha256-SwP7NazsiUyDD4LUziCwN0X9GTQVq0lYM2jXqNaXLEA=";
18+
};
19+
20+
buildInputs = [
21+
python3
22+
uglify-js
23+
];
24+
25+
installPhase = ''
26+
runHook preInstall
27+
python $src/setup.py install $out /share/xpra/www /share/xpra/www
28+
runHook postInstall
29+
'';
30+
31+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
32+
33+
meta = {
34+
homepage = "https://xpra.org/";
35+
downloadPage = "https://xpra.org/src/";
36+
description = "HTML5 client for Xpra";
37+
changelog = "https://github.com/Xpra-org/xpra-html5/releases/tag/v${finalAttrs.version}";
38+
platforms = lib.platforms.linux;
39+
license = lib.licenses.mpl20;
40+
maintainers = with lib.maintainers; [
41+
catern
42+
lucasew
43+
];
44+
};
45+
})

pkgs/tools/X11/xpra/default.nix

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
pam,
3030
pandoc,
3131
pango,
32-
pulseaudio,
32+
pulseaudioFull,
3333
python3,
3434
stdenv,
3535
util-linux,
@@ -46,6 +46,8 @@
4646
xorgserver,
4747
xxHash,
4848
clang,
49+
withHtml ? true,
50+
xpra-html5,
4951
}@args:
5052

5153
let
@@ -94,7 +96,7 @@ buildPythonApplication rec {
9496
src = fetchFromGitHub {
9597
owner = "Xpra-org";
9698
repo = "xpra";
97-
rev = "v${version}";
99+
tag = "v${version}";
98100
hash = "sha256-XY8NZhWCRLjpgq0dOClzftvMR7g/X64b+OYyjOGC/lM=";
99101
};
100102

@@ -245,7 +247,7 @@ buildPythonApplication rec {
245247
xauth
246248
which
247249
util-linux
248-
pulseaudio
250+
pulseaudioFull
249251
]
250252
}
251253
''
@@ -256,16 +258,20 @@ buildPythonApplication rec {
256258
)
257259
'';
258260

259-
postInstall = ''
260-
# append module paths to xorg.conf
261-
cat ${xorgModulePaths} >> $out/etc/xpra/xorg.conf
262-
cat ${xorgModulePaths} >> $out/etc/xpra/xorg-uinput.conf
261+
postInstall =
262+
''
263+
# append module paths to xorg.conf
264+
cat ${xorgModulePaths} >> $out/etc/xpra/xorg.conf
265+
cat ${xorgModulePaths} >> $out/etc/xpra/xorg-uinput.conf
263266
264-
# make application icon visible to desktop environemnts
265-
icon_dir="$out/share/icons/hicolor/64x64/apps"
266-
mkdir -p "$icon_dir"
267-
ln -sr "$out/share/icons/xpra.png" "$icon_dir"
268-
'';
267+
# make application icon visible to desktop environemnts
268+
icon_dir="$out/share/icons/hicolor/64x64/apps"
269+
mkdir -p "$icon_dir"
270+
ln -sr "$out/share/icons/xpra.png" "$icon_dir"
271+
''
272+
+ lib.optionalString withHtml ''
273+
ln -s ${xpra-html5}/share/xpra/www $out/share/xpra/www;
274+
'';
269275

270276
doCheck = false;
271277

@@ -276,17 +282,18 @@ buildPythonApplication rec {
276282
updateScript = ./update.sh;
277283
};
278284

279-
meta = with lib; {
285+
meta = {
280286
homepage = "https://xpra.org/";
281287
downloadPage = "https://xpra.org/src/";
282288
description = "Persistent remote applications for X";
283289
changelog = "https://github.com/Xpra-org/xpra/releases/tag/v${version}";
284-
platforms = platforms.linux;
285-
license = licenses.gpl2Only;
286-
maintainers = with maintainers; [
290+
platforms = lib.platforms.linux;
291+
license = lib.licenses.gpl2Only;
292+
maintainers = with lib.maintainers; [
287293
offline
288294
numinit
289295
mvnetbiz
296+
lucasew
290297
];
291298
};
292299
}

0 commit comments

Comments
 (0)