mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
13cc17cc53
`utils/novnc_proxy` tries to download and run the `websockify` package in the directory where the script is located, which doesn't work because the nix store is read-only. This patches the script to point to nix-installed `websockify`.
42 lines
1016 B
Nix
42 lines
1016 B
Nix
{ lib, python3, stdenv, substituteAll, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "novnc";
|
|
version = "1.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "novnc";
|
|
repo = "noVNC";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Z+bks7kcwj+Z3uf/t0u25DnGOM60QhSH6uuoIi59jqU=";
|
|
};
|
|
|
|
patches = with python3.pkgs; [
|
|
(substituteAll {
|
|
src = ./websockify.patch;
|
|
inherit websockify;
|
|
})
|
|
] ++ [ ./fix-paths.patch ];
|
|
|
|
postPatch = ''
|
|
substituteAllInPlace utils/novnc_proxy
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 utils/novnc_proxy "$out/bin/novnc"
|
|
install -dm755 "$out/share/webapps/novnc/"
|
|
cp -a app core po vendor vnc.html karma.conf.js package.json vnc_lite.html "$out/share/webapps/novnc/"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "VNC client web application";
|
|
homepage = "https://novnc.com";
|
|
license = with licenses; [ mpl20 ofl bsd3 bsd2 mit ];
|
|
maintainers = with maintainers; [ neverbehave ];
|
|
};
|
|
}
|