[Nix-dev] [PATCH] t/tigervnc

Lluís Batlle i Rossell viriketo at gmail.com
Tue Oct 26 10:40:18 CEST 2010


Thank you Marc.

Wouldn't you prefer it as an option of the tigervnc package, instead of a new
attribute in nixpkgs?

Is this the java client to be used as web applet, served by tigervnc? I think
that java appled is worth getting working, and your patch may be very close to
it.

On Tue, Oct 26, 2010 at 04:38:37AM +0200, Marc Weber wrote:
> build tigervnc java applet
> 
> Signed-off-by: Marc Weber <marco-oweber at gmx.de>
> ---
>  pkgs/tools/admin/tigervnc-java-client/default.nix |   59 +++++++++++++++++++++
>  pkgs/top-level/all-packages.nix                   |    1 +
>  2 files changed, 60 insertions(+), 0 deletions(-)
>  create mode 100644 pkgs/tools/admin/tigervnc-java-client/default.nix
> 
> diff --git a/pkgs/tools/admin/tigervnc-java-client/default.nix b/pkgs/tools/admin/tigervnc-java-client/default.nix
> new file mode 100644
> index 0000000..5b58430
> --- /dev/null
> +++ b/pkgs/tools/admin/tigervnc-java-client/default.nix
> @@ -0,0 +1,59 @@
> +{stdenv, tigervnc, jdk}:
> +
> +stdenv.mkDerivation {
> +  name = "tigervnc-java-client";
> +
> +  inherit (tigervnc) src;
> +
> +  buildInputs = [jdk];
> +
> +  configurePhase = ":";
> +
> +  buildPhase = ''
> +    pwd
> +    cd java/src/com/tigervnc/vncviewer
> +    make all
> +  '';
> +
> +  installPhase = ''
> +    d=$out/share/doc/tigervnc-java-viewer
> +    ensureDir $d
> +    make INSTALL_DIR=$out install
> +    cp README $d
> +    rm $out/*.class
> +
> +    ensureDir $out/bin
> +    s=$out/bin/vncviewer-java
> +    cat >> $s << EOF
> +    #!/bin/sh
> +    [ 0 != "\$#" ] || {
> +      echo "usage: \$0 HOST ip PORT port ... # see $d/README"
> +      exit 1
> +    }
> +    java -jar $out/VncViewer.jar "\$@"
> +    EOF
> +    chmod +x $s
> +  '';
> +
> +  meta = {
> +    description = "the java client of tigervnc";
> +    homepage = tigervnc.meta.homepage;
> +    longDescription = ''
> +      usage:
> +
> +      either by using a html page:
> +
> +      <APPLET CODE=com.tigervnc.vncviewer.VncViewer.class ARCHIVE=VncViewer.jar WIDTH=1000 HEIGHT=800>
> +          <PARAM NAME="PORT" VALUE=5901>
> +          <PARAM NAME="Scaling factor" VALUE=100>
> +      </APPLET>
> +
> +      or as standalone (java -jar ..)
> +
> +      java/src/com/tigervnc/vncviewer/README contains a list of all options
> +    '';
> +    license = "GPL"; # and 2 clause BSD license (-> README: ACKNOWLEDGEMENTS)
> +    maintainers = [stdenv.lib.maintainers.marcweber];
> +    platforms = stdenv.lib.platforms.linux;
> +  };
> +}
> diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
> index d6fd98b..8a3aef0 100644
> --- a/pkgs/top-level/all-packages.nix
> +++ b/pkgs/top-level/all-packages.nix
> @@ -1268,6 +1268,7 @@ let
>      fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
>        xorg.fontbhlucidatypewriter75dpi ];
>    };
> +  tigervncJavaClient = callPackage ../tools/admin/tigervnc-java-client { };
>  
>    tightvnc = callPackage ../tools/admin/tightvnc {
>      fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
> -- 
> 1.7.3.1
> 
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list