1 { lib, stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, firefox-unwrapped, zip, pkg-config, npapi_sdk, bash, bc }:
3 stdenv.mkDerivation rec {
4 pname = "adoptopenjdk-icedtea-web";
8 src = fetchFromGitHub {
9 owner = "AdoptOpenJDK";
11 rev = "icedtea-web-${version}";
12 sha256 = "sha256-hpEVWG9ltNDL/0EFJjgQRRce+BLcCO4ZERULYZxyC1o=";
15 nativeBuildInputs = [ autoreconfHook pkg-config bc ];
16 buildInputs = [ cargo rustc glib firefox-unwrapped zip npapi_sdk ];
19 configureFlagsArray+=("BIN_BASH=${bash}/bin/bash")
22 patches = [ ./patches/0001-make-cargo-work-with-nix-build-on-linux.patch ];
26 # Needed for the below rust-launcher tests to pass
27 # dirs_paths_helper::tests::check_config_files_paths
28 # dirs_paths_helper::tests::check_legacy_config_files_paths
30 mkdir -p $HOME/.icedtea
31 touch $HOME/.icedtea/deployment.properties
33 mkdir -p $XDG_CONFIG_HOME/icedtea-web
34 touch $XDG_CONFIG_HOME/icedtea-web/deployment.properties
38 XDG_CONFIG_HOME = "/build";
41 "--with-itw-libs=DISTRIBUTION"
42 "--with-jdk-home=${jdk.home}"
46 mozillaPlugin = "/lib";
49 mkdir -p $out/share/applications
50 cp javaws.desktop itweb-settings.desktop policyeditor.desktop $out/share/applications
54 description = "Java web browser plugin and an implementation of Java Web Start";
56 A Free Software web browser plugin running applets written in the Java
57 programming language and an implementation of Java Web Start, originally
58 based on the NetX project.
60 homepage = "https://github.com/adoptopenjdk/icedtea-web";
61 platforms = lib.platforms.linux;