Log in New API Help About

6.7 KB of Diff
Created 1 month, 2 weeks ago — expires in 318 days
https://dpaste.com/HGVTQZDPQ
SOFT WRAP RAW TEXT DUPLICATE DIFF
diff --git a/pkgs/applications/office/ib/tws/default.nix b/pkgs/applications/office/ib/tws/default.nix
index 403f675cb4e..d32fab26d0d 100644
--- a/pkgs/applications/office/ib/tws/default.nix
+++ b/pkgs/applications/office/ib/tws/default.nix
@@ -1,18 +1,21 @@
-{ lib, stdenv, requireFile, jdk }:
+{ lib, stdenv, fetchurl, jdk }:
 
 stdenv.mkDerivation rec {
   version = "9542";
   pname = "ib-tws";
 
-  src = requireFile rec {
+  src = fetchurl rec {
     name = "ibtws_${version}.jar";
-    message = ''
-      This nix expression requires that ${name} is already part of the store.
-      Download the TWS from
-      https://download2.interactivebrokers.com/download/unixmacosx_latest.jar,
-      rename the file to ${name}, and add it to the nix store with
-      "nix-prefetch-url file://\$PWD/${name}".
-    '';
+#    message = ''
+#      This nix expression requires that ${name} is already part of the store.
+#      Download the TWS from
+#      https://download2.interactivebrokers.com/download/unixmacosx_latest.jar,
+#      rename the file to ${name}, and add it to the nix store with
+#      "nix-prefetch-url file://\$PWD/${name}".
+#      tmpdir=$(mktemp -d -q -t XXX.ibtws_${version}) &&  curl -s -N https://download2.interactivebrokers.com/download/unixmacosx_latest.jar -o $tmpdir/ibtws_${version}.jar ; nix-prefetch-url file:///$tmpdir/ibtws_${version}.jar
+#    '';
+    url="https://download2.interactivebrokers.com/download/unixmacosx_latest.jar";
+
     sha256 = "1a2jiwwnr5g3xfba1a89c257bdbnq4zglri8hz021vk7f6s4rlrf";
   };
 
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index 41f4befe469..93179e74246 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -7,7 +7,7 @@
 
 { swingSupport ? true
 , lib, stdenv
-, requireFile
+, fetchurl
 , makeWrapper
 , unzip
 , file
@@ -48,9 +48,11 @@ let
 
   jce =
     if installjce then
-      requireFile {
+      fetchurl {
         name = jceName;
-        url = "http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html";
+#      url = "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html";
+      url = "https://download.oracle.com/otn-pub/java/jdk/8u281-b09/89d678f2be164786b292527658ca1605/${jceName}";
+#      sha256 = sha256.${stdenv.hostPlatform.system};
         sha256 = sha256JCE;
       }
     else
@@ -77,9 +79,10 @@ let result = stdenv.mkDerivation rec {
         armv7l-linux  = "linux-arm32-vfp-hflt";
         aarch64-linux = "linux-aarch64";
       }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
-    in requireFile {
+    in fetchurl {
       name = "jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
-      url = "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html";
+#      url = "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html";
+      url = "https://download.oracle.com/otn-pub/java/jdk/8u281-b09/89d678f2be164786b292527658ca1605/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
       sha256 = sha256.${stdenv.hostPlatform.system};
     };
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 5ec802aeef4..517a169ad9c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -492,6 +492,62 @@ in
     inherit curl stdenv;
   };
 
+  # `fetchevil' downloads a file from the oracle network.
+  fetchevil = if stdenv.buildPlatform != stdenv.hostPlatform
+   then buildPackages.fetchurl # No need to do special overrides twice,
+   else makeOverridable (import ../build-support/fetchevil) {
+    inherit lib stdenvNoCC buildPackages;
+    inherit cacert;
+    curl = buildPackages.curlMinimal.override (old: rec {
+      # break dependency cycles
+      fetchurl = stdenv.fetchurlBoot;
+      zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; };
+      pkg-config = buildPackages.pkg-config.override (old: {
+        pkg-config = old.pkg-config.override {
+          fetchurl = stdenv.fetchurlBoot;
+        };
+      });
+      perl = buildPackages.perl.override { fetchurl = stdenv.fetchurlBoot; };
+      openssl = buildPackages.openssl.override {
+        fetchurl = stdenv.fetchurlBoot;
+        coreutils = buildPackages.coreutils.override {
+          fetchurl = stdenv.fetchurlBoot;
+          inherit perl;
+          xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; };
+          gmp = null;
+          aclSupport = false;
+          attrSupport = false;
+        };
+        inherit perl;
+        buildPackages = { inherit perl; };
+      };
+      libssh2 = buildPackages.libssh2.override {
+        fetchurl = stdenv.fetchurlBoot;
+        inherit zlib openssl;
+      };
+      # On darwin, libkrb5 needs bootstrap_cmds which would require
+      # converting many packages to fetchurl_boot to avoid evaluation cycles.
+      # So turn gssSupport off there, and on Windows.
+      # On other platforms, keep the previous value.
+      gssSupport =
+        if stdenv.isDarwin || stdenv.hostPlatform.isWindows
+          then false
+          else old.gssSupport or true; # `? true` is the default
+      libkrb5 = buildPackages.libkrb5.override {
+        fetchurl = stdenv.fetchurlBoot;
+        inherit pkg-config perl openssl;
+        keyutils = buildPackages.keyutils.override { fetchurl = stdenv.fetchurlBoot; };
+      };
+      nghttp2 = buildPackages.nghttp2.override {
+        fetchurl = stdenv.fetchurlBoot;
+        inherit zlib pkg-config openssl;
+        c-ares = buildPackages.c-ares.override { fetchurl = stdenv.fetchurlBoot; };
+        libev = buildPackages.libev.override { fetchurl = stdenv.fetchurlBoot; };
+      };
+    });
+  };
+
+
   fetchzip = callPackage ../build-support/fetchzip { };
 
   fetchCrate = callPackage ../build-support/rust/fetchcrate.nix { };
@@ -10716,6 +10772,7 @@ in
     (if pluginSupport then appendToName "with-plugin" else x: x)
       (callPackage ../development/compilers/oraclejdk/jdk8-linux.nix {
         inherit installjdk pluginSupport;
+        fetchurl = fetchevil;
       });
 
   oraclejdk11 = callPackage ../development/compilers/oraclejdk/jdk11-linux.nix { };
@@ -30072,8 +30129,12 @@ in
   texlive = recurseIntoAttrs
     (callPackage ../tools/typesetting/tex/texlive { });
 
+  #ib-tws = callPackage ../applications/office/ib/tws { jdk=zulu8; };
+
   ib-tws = callPackage ../applications/office/ib/tws { jdk=oraclejdk8; };
 
+  #ib-controller = callPackage ../applications/office/ib/controller { jdk=zulu8; };
+
   ib-controller = callPackage ../applications/office/ib/controller { jdk=oraclejdk8; };
 
   vnote = libsForQt5.callPackage ../applications/office/vnote { };