Skip to content

Commit

Permalink
xpra-html5: init at v17
Browse files Browse the repository at this point in the history
Also add as an optional dependency of xpra, enabled by default.

Closes #384368
  • Loading branch information
catern committed Feb 23, 2025
1 parent 2e56812 commit ac2b3b4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 9 deletions.
35 changes: 35 additions & 0 deletions pkgs/by-name/xp/xpra-html5/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
stdenv,
python3,
uglify-js,
}:
stdenv.mkDerivation rec {
name = "xpra-html5";
version = "17";

src = fetchFromGitHub {
owner = "Xpra-org";
repo = "xpra-html5";
rev = "v${version}";
hash = "sha256-SwP7NazsiUyDD4LUziCwN0X9GTQVq0lYM2jXqNaXLEA=";
};
buildInputs = [
python3
uglify-js
];
installPhase = "python $src/setup.py install $out /share/xpra/www /share/xpra/www";

meta = with lib; {
homepage = "https://xpra.org/";
downloadPage = "https://xpra.org/src/";
description = "HTML5 client for Xpra";
changelog = "https://github.com/Xpra-org/xpra-html5/releases/tag/v${version}";
platforms = platforms.linux;
license = licenses.mpl20;
maintainers = with maintainers; [
catern
];
};
}
24 changes: 15 additions & 9 deletions pkgs/tools/X11/xpra/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
xorgserver,
xxHash,
clang,
withHtml ? true,
xpra-html5,
}@args:

let
Expand Down Expand Up @@ -240,16 +242,20 @@ buildPythonApplication rec {
)
'';

postInstall = ''
# append module paths to xorg.conf
cat ${xorgModulePaths} >> $out/etc/xpra/xorg.conf
cat ${xorgModulePaths} >> $out/etc/xpra/xorg-uinput.conf
postInstall =
''
# append module paths to xorg.conf
cat ${xorgModulePaths} >> $out/etc/xpra/xorg.conf
cat ${xorgModulePaths} >> $out/etc/xpra/xorg-uinput.conf
# make application icon visible to desktop environemnts
icon_dir="$out/share/icons/hicolor/64x64/apps"
mkdir -p "$icon_dir"
ln -sr "$out/share/icons/xpra.png" "$icon_dir"
'';
# make application icon visible to desktop environemnts
icon_dir="$out/share/icons/hicolor/64x64/apps"
mkdir -p "$icon_dir"
ln -sr "$out/share/icons/xpra.png" "$icon_dir"
''
+ lib.optionalString withHtml ''
ln -s ${xpra-html5}/share/xpra/www $out/share/xpra/www;
'';

doCheck = false;

Expand Down

0 comments on commit ac2b3b4

Please sign in to comment.