summary refs log tree commit diff
path: root/pkgs/development/compilers/adoptopenjdk-icedtea-web
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-08-24 08:19:05 +0200
committerVladimír Čunát <v@cunat.cz>2019-08-24 08:55:37 +0200
commit2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1 (patch)
tree36de0660dc2c9f3731bd8b60ec852ca0c452efce /pkgs/development/compilers/adoptopenjdk-icedtea-web
parent84a91208a948be5eca97ea182c4256d9d6ecf171 (diff)
parent8943fb5f24b9e1aa1d577be4e214d166643269fd (diff)
downloadnixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.gz
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.bz2
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.lz
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.xz
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.zst
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.zip
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
Diffstat (limited to 'pkgs/development/compilers/adoptopenjdk-icedtea-web')
-rw-r--r--pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix64
-rw-r--r--pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch46
2 files changed, 110 insertions, 0 deletions
diff --git a/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix b/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix
new file mode 100644
index 00000000000..305e0f202bf
--- /dev/null
+++ b/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, xulrunner, zip, pkgconfig, npapi_sdk, bash, bc }:
+
+stdenv.mkDerivation rec {
+  pname = "adoptopenjdk-icedtea-web";
+
+  version = "1.8.3";
+
+  src = fetchFromGitHub {
+    owner = "AdoptOpenJDK";
+    repo = "IcedTea-Web";
+    rev = "icedtea-web-${version}";
+    sha256 = "0bm5k11i2vgb54ch1bawsmjbwnqnp04saadwm2f2mggmmdc6b1qq";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig bc ];
+  buildInputs = [ cargo rustc glib xulrunner zip npapi_sdk ];
+
+  preConfigure = ''
+    configureFlagsArray+=("BIN_BASH=${bash}/bin/bash")
+  '';
+
+  patches = [ ./patches/0001-make-cargo-work-with-nix-build-on-linux.patch ];
+
+  doCheck = true;
+  preCheck = ''
+    # Needed for the below rust-launcher tests to pass
+    # dirs_paths_helper::tests::check_config_files_paths
+    # dirs_paths_helper::tests::check_legacy_config_files_paths
+
+    mkdir -p $HOME/.icedtea
+    touch $HOME/.icedtea/deployment.properties
+
+    mkdir -p $XDG_CONFIG_HOME/icedtea-web
+    touch $XDG_CONFIG_HOME/icedtea-web/deployment.properties
+  '';
+
+  HOME = "/build";
+  XDG_CONFIG_HOME = "/build";
+
+  configureFlags = [
+    "--with-itw-libs=DISTRIBUTION"
+    "--with-jdk-home=${jdk.home}"
+    "--disable-docs"
+  ];
+
+  mozillaPlugin = "/lib";
+
+  postInstall = ''
+    mkdir -p $out/share/applications
+    cp javaws.desktop itweb-settings.desktop policyeditor.desktop $out/share/applications
+  '';
+
+  meta = {
+    description = "Java web browser plugin and an implementation of Java Web Start";
+    longDescription = ''
+      A Free Software web browser plugin running applets written in the Java
+      programming language and an implementation of Java Web Start, originally
+      based on the NetX project.
+    '';
+    homepage = https://github.com/adoptopenjdk/icedtea-web;
+    maintainers = with stdenv.lib.maintainers; [ wizeman ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch b/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch
new file mode 100644
index 00000000000..85cad6cf467
--- /dev/null
+++ b/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch
@@ -0,0 +1,46 @@
+Subject: [PATCH] make cargo work with nix-build on linux
+
+---
+ .cargo/config            | 2 ++
+ rust-launcher/Cargo.lock | 4 ++++
+ rust-launcher/Cargo.toml | 7 ++++---
+ 3 files changed, 10 insertions(+), 3 deletions(-)
+ create mode 100644 .cargo/config
+ create mode 100644 rust-launcher/Cargo.lock
+
+diff --git a/.cargo/config b/.cargo/config
+new file mode 100644
+index 0000000..03ec4a2
+--- /dev/null
++++ b/.cargo/config
+@@ -0,0 +1,2 @@
++[net]
++offline=true
+diff --git a/rust-launcher/Cargo.lock b/rust-launcher/Cargo.lock
+new file mode 100644
+index 0000000..6055cc0
+--- /dev/null
++++ b/rust-launcher/Cargo.lock
+@@ -0,0 +1,4 @@
++[[package]]
++name = "launcher"
++version = "1.8.0"
++
+diff --git a/rust-launcher/Cargo.toml b/rust-launcher/Cargo.toml
+index 61ee308..5e6e91b 100644
+--- a/rust-launcher/Cargo.toml
++++ b/rust-launcher/Cargo.toml
+@@ -3,6 +3,7 @@ name = "launcher"
+ version = "1.8.0"
+ authors = ["https://icedtea.classpath.org/wiki/IcedTea-Web"]
+ 
+-[dependencies]
+-[target.'cfg(windows)'.dependencies]
+-dunce = "0.1.1"
++[workspace]
++# We need this too or cargo will fail.  Some files seem to be copied around and
++# cargo thinks we are in a workspace, so let's exclude everything.
++exclude = ["*"]
+-- 
+2.19.2
+