Merge branch 'master' into staging
This commit is contained in:
@@ -6,7 +6,7 @@ import re
|
||||
import requests
|
||||
import sys
|
||||
|
||||
releases = ("openjdk8", "openjdk11")
|
||||
releases = ("openjdk8", "openjdk11", "openjdk13")
|
||||
oses = ("mac", "linux")
|
||||
types = ("jre", "jdk")
|
||||
impls = ("hotspot", "openj9")
|
||||
|
||||
@@ -9,6 +9,7 @@ sourcePerArch:
|
||||
, fontconfig
|
||||
, zlib
|
||||
, xorg
|
||||
, libffi
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -29,7 +30,7 @@ let result = stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
alsaLib freetype fontconfig zlib xorg.libX11 xorg.libXext xorg.libXtst
|
||||
xorg.libXi xorg.libXrender
|
||||
];
|
||||
] ++ lib.optional stdenv.isAarch32 libffi;
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix sources.openjdk13.mac.jdk.hotspot;
|
||||
jre-hotspot = import ./jdk-darwin-base.nix sources.openjdk13.mac.jre.hotspot;
|
||||
jdk-openj9 = import ./jdk-darwin-base.nix sources.openjdk13.mac.jdk.openj9;
|
||||
jre-openj9 = import ./jdk-darwin-base.nix sources.openjdk13.mac.jre.openj9;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix sources.openjdk13.linux.jdk.hotspot;
|
||||
jre-hotspot = import ./jdk-linux-base.nix sources.openjdk13.linux.jre.hotspot;
|
||||
jdk-openj9 = import ./jdk-linux-base.nix sources.openjdk13.linux.jdk.openj9;
|
||||
jre-openj9 = import ./jdk-linux-base.nix sources.openjdk13.linux.jre.openj9;
|
||||
}
|
||||
@@ -117,6 +117,124 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"openjdk13": {
|
||||
"linux": {
|
||||
"jdk": {
|
||||
"hotspot": {
|
||||
"aarch64": {
|
||||
"build": "33",
|
||||
"sha256": "74f4110333ac4239564ed864b1d7d69b7af32af39efcfbde9816e1486cb5ae07",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_aarch64_linux_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
},
|
||||
"armv6l": {
|
||||
"build": "33",
|
||||
"sha256": "477e1b8d26a220d6d570765e9e0a4a34dbb489fab63a420d0859d173efc59adb",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_arm_linux_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
},
|
||||
"armv7l": {
|
||||
"build": "33",
|
||||
"sha256": "477e1b8d26a220d6d570765e9e0a4a34dbb489fab63a420d0859d173efc59adb",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_arm_linux_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
},
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "e562caeffa89c834a69a44242d802eae3523875e427f07c05b1902c152638368",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_linux_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "68ebab0021c719694be8fc868478725a69c5c515cdb62e2933eefe87ba6437df",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jdk_x64_linux_openj9_13_33_openj9-0.16.0.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"jre": {
|
||||
"hotspot": {
|
||||
"aarch64": {
|
||||
"build": "33",
|
||||
"sha256": "2365b7fbba8d9125fb091933aad9f38f8cc1fbb0217cdec9ec75d2000f6d451a",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jre_aarch64_linux_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
},
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "73800a0d7c4e81df408a8518d282aa2c001ce4ee15541574c639dfc3564f708f",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jre_x64_linux_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jre",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "2ee59be5062a81daa7be85be161cab6b245f9a2e2cbd4769ae9edefaac41e31d",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jre_x64_linux_openj9_13_33_openj9-0.16.0.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mac": {
|
||||
"jdk": {
|
||||
"hotspot": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "f948be96daba250b6695e22cb51372d2ba3060e4d778dd09c89548889783099f",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "583e0defd5c062550896ead7cac383be16f1a81d9b6492dfec26da9af5dcc1c0",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jdk_x64_mac_openj9_13_33_openj9-0.16.0.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"jre": {
|
||||
"hotspot": {
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "1c23efba7908de9a611a98e755602f45381a8f7c957adb3fc4012ab1369a352c",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jre_x64_mac_hotspot_13_33.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jre",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "33",
|
||||
"sha256": "33a60b78138d50cb02325156c7d1fcf588697749a4401f6c11a3cbefa3033127",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jre_x64_mac_openj9_13_33_openj9-0.16.0.tar.gz",
|
||||
"version": "13.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"openjdk8": {
|
||||
"linux": {
|
||||
"jdk": {
|
||||
@@ -139,6 +257,18 @@
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
},
|
||||
"armv6l": {
|
||||
"build": "10",
|
||||
"sha256": "7b3d6ade8c25adca01095ba66642132d8c87a1a8caf3883850e34778453afcec",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_arm_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
},
|
||||
"armv7l": {
|
||||
"build": "10",
|
||||
"sha256": "7b3d6ade8c25adca01095ba66642132d8c87a1a8caf3883850e34778453afcec",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_arm_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
},
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
@@ -179,6 +309,18 @@
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_arm_linux_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
},
|
||||
"armv6l": {
|
||||
"build": "10",
|
||||
"sha256": "19de77b74812b90851816bdb991d6473488a10d3ac293c6accf46ae9b1f714a0",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_arm_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
},
|
||||
"armv7l": {
|
||||
"build": "10",
|
||||
"sha256": "19de77b74812b90851816bdb991d6473488a10d3ac293c6accf46ae9b1f714a0",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_arm_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
},
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
@@ -247,4 +389,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,18 +16,28 @@
|
||||
patches = [];
|
||||
}))
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
|
||||
let
|
||||
bin_folder = if stdenv.isDarwin then "darwin" else "linux";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit src version;
|
||||
pname = "bs-platform";
|
||||
|
||||
BS_RELEASE_BUILD = "true";
|
||||
|
||||
# BuckleScript's idiosyncratic build process only builds artifacts required
|
||||
# for editor-tooling to work when this environment variable is set:
|
||||
# https://github.com/BuckleScript/bucklescript/blob/7.2.0/scripts/install.js#L225-L227
|
||||
BS_TRAVIS_CI = "1";
|
||||
|
||||
buildInputs = [ nodejs python3 custom-ninja ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
|
||||
mkdir -p ./native/${ocaml-version}/bin
|
||||
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
|
||||
rm -f vendor/ninja/snapshot/ninja.linux
|
||||
cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
|
||||
'';
|
||||
|
||||
# avoid building the development version, will break aarch64 build
|
||||
@@ -41,10 +51,14 @@ stdenv.mkDerivation {
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -rf jscomp lib vendor odoc_gen native $out
|
||||
cp -rf jscomp lib ${bin_folder} vendor odoc_gen native bsb bsc bsrefmt $out
|
||||
mkdir $out/lib/ocaml
|
||||
cp jscomp/runtime/js.* jscomp/runtime/*.cm* $out/lib/ocaml
|
||||
cp jscomp/others/*.ml jscomp/others/*.mli jscomp/others/*.cm* $out/lib/ocaml
|
||||
cp jscomp/stdlib-406/*.ml jscomp/stdlib-406/*.mli jscomp/stdlib-406/*.cm* $out/lib/ocaml
|
||||
cp bsconfig.json package.json $out
|
||||
ln -s $out/lib/bsb $out/bin/bsb
|
||||
ln -s $out/lib/bsc $out/bin/bsc
|
||||
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
|
||||
ln -s $out/bsb $out/bin/bsb
|
||||
ln -s $out/bsc $out/bin/bsc
|
||||
ln -s $out/bsrefmt $out/bin/bsrefmt
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
let
|
||||
build-bs-platform = import ./build-bs-platform.nix;
|
||||
in
|
||||
(build-bs-platform {
|
||||
(build-bs-platform rec {
|
||||
inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
|
||||
version = "7.0.1";
|
||||
version = "7.2.0";
|
||||
ocaml-version = "4.06.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "BuckleScript";
|
||||
repo = "bucklescript";
|
||||
rev = "52770839e293ade2bcf187f2639000ca0a9a1d46";
|
||||
sha256 = "0s7g2zfhshsilv9zyp0246bypg34d294z27alpwz03ws9608yr7k";
|
||||
rev = version;
|
||||
sha256 = "1fsx7gvcp6rbqd0qf5fix02mbbmk9rgm09zbwjrx0lp5cjv3n2s4";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
|
||||
@@ -42,6 +42,7 @@ let
|
||||
doCheck = false;
|
||||
jailbreak = true;
|
||||
}));
|
||||
|
||||
elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: {
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
@@ -50,6 +51,23 @@ let
|
||||
jailbreak = true;
|
||||
}));
|
||||
|
||||
elm-instrument = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-instrument.nix {}) (drv: {
|
||||
patches = [(
|
||||
# GHC 8.8.1 and Cabal >= 1.25.0 support
|
||||
# https://github.com/zwilias/elm-instrument/pull/3
|
||||
fetchpatch {
|
||||
url = "https://github.com/turboMaCk/elm-instrument/commit/4272db2aea742c8b54509e536fa4f35d04f95da5.patch";
|
||||
sha256 = "1d1lc43lp3x5jfhlyb1b7na7nj1g1i1vc1np26pcisg9c2s7gjz6";
|
||||
}
|
||||
)];
|
||||
prePatch = ''
|
||||
sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place
|
||||
'';
|
||||
jailbreak = true;
|
||||
# Tests are failing because of missing instances for Eq and Show type classes
|
||||
doCheck = false;
|
||||
}));
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
};
|
||||
@@ -76,6 +94,26 @@ let
|
||||
in with hsPkgs.elmPkgs; {
|
||||
elm-test = patchBinwrap [elmi-to-json] nodePkgs.elm-test;
|
||||
elm-verify-examples = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples;
|
||||
elm-coverage =
|
||||
let patched = patchBinwrap [elmi-to-json] nodePkgs.elm-coverage;
|
||||
in patched.override {
|
||||
preRebuild = ''
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\"/g' --in-place package.json
|
||||
|
||||
# This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done
|
||||
# in case of just this package
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
|
||||
|
||||
rm node_modules/elm/install.js
|
||||
echo "console.log('no-op');" > node_modules/elm/install.js
|
||||
'';
|
||||
|
||||
# Link Elm instrument binary
|
||||
postInstall = patched.postInstall + ''
|
||||
mkdir -p unpacked_bin
|
||||
ln -sf ${elm-instrument}/bin/elm-instrument unpacked_bin/elm-instrument
|
||||
'';
|
||||
};
|
||||
elm-language-server = nodePkgs."@elm-tooling/elm-language-server";
|
||||
|
||||
inherit (nodePkgs) elm-doc-preview elm-live elm-upgrade elm-xref elm-analyse;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
|
||||
, bytestring, Cabal, cmark, containers, directory, elm-format
|
||||
, fetchgit, filepath, free, HUnit, indents, json, mtl
|
||||
, optparse-applicative, parsec, process, QuickCheck, quickcheck-io
|
||||
, split, stdenv, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
|
||||
, text, elm
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-instrument";
|
||||
version = "0.0.7";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/zwilias/elm-instrument.git";
|
||||
sha256 = "14yfzwsyvgc6rzn19sdmwk2mc1vma9hcljnmjnmlig8mp0271v56";
|
||||
rev = "31b527e405a6afdb25bb87ad7bd14f979e65cff7";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
setupHaskellDepends = [ base Cabal directory filepath process ];
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint base binary bytestring containers
|
||||
directory filepath free indents json mtl optparse-applicative
|
||||
parsec process split text
|
||||
];
|
||||
executableHaskellDepends = [ base ];
|
||||
testHaskellDepends = [
|
||||
base cmark containers elm-format HUnit mtl parsec QuickCheck
|
||||
quickcheck-io split tasty tasty-golden tasty-hunit tasty-quickcheck
|
||||
text
|
||||
];
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Instrumentation library for Elm";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
@@ -5,11 +5,11 @@
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elmi-to-json";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/stoeffel/elmi-to-json.git";
|
||||
sha256 = "1kxai87h2g0749yq0fkxwk3xaavydraaivhnavbwr62q2hw4wrj7";
|
||||
rev = "af08ceafe742a252f1f1f3c229b0ce3b3e00084d";
|
||||
url = "https://github.com/stoeffel/elmi-to-json";
|
||||
sha256 = "11j56vcyhijkwi9hzggkwwmxlhzhgm67ab2m7kxkhcbbqgpasa8n";
|
||||
rev = "ae40d1aa1e3d6878f2af514e611d44890e7abc1e";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nodePackages.node2nix
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../../..)"
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
rm -f node-env.nix
|
||||
node2nix --nodejs-10 \
|
||||
$(nix-build $ROOT -A nodePackages.node2nix --no-out-link)/bin/node2nix \
|
||||
--nodejs-10 \
|
||||
-i node-packages.json \
|
||||
-o node-packages.nix \
|
||||
-c node-composition.nix \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# This file has been generated by node2nix 1.7.0. Do not edit!
|
||||
# This file has been generated by node2nix 1.8.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[
|
||||
"elm-test",
|
||||
"elm-verify-examples",
|
||||
"elm-doc-preview",
|
||||
"elm-upgrade",
|
||||
"elm-analyse",
|
||||
"elm-coverage",
|
||||
"elm-doc-preview",
|
||||
"@elm-tooling/elm-language-server",
|
||||
"elm-live",
|
||||
"elm-xref",
|
||||
"@elm-tooling/elm-language-server"
|
||||
"elm-test",
|
||||
"elm-upgrade",
|
||||
"elm-verify-examples",
|
||||
"elm-xref"
|
||||
]
|
||||
|
||||
+1228
-647
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ in
|
||||
targets:
|
||||
pkg:
|
||||
pkg.override {
|
||||
buildInputs = [ binwrap binwrap-install ];
|
||||
nativeBuildInputs = pkg.nativeBuildInputs ++ [ binwrap binwrap-install ];
|
||||
|
||||
# Manually install targets
|
||||
# by symlinking binaries into `node_modules`
|
||||
|
||||
@@ -43,7 +43,7 @@ with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "8";
|
||||
version = "${majorVersion}.3.0";
|
||||
version = "${majorVersion}.4.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -77,7 +77,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4";
|
||||
sha256 = "1m1d3gfix56w4aq8myazzfffkl8bqcrx4jhhapnjf7qfs596w2p3";
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
|
||||
@@ -1,54 +1,15 @@
|
||||
{ stdenv, lib, fetchurl, file, glib, libxml2, libav_0_8, ffmpeg, libxslt
|
||||
, libGL , xorg, alsaLib, fontconfig, freetype, pango, gtk2, cairo
|
||||
, gdk-pixbuf, atk, zlib }:
|
||||
|
||||
# TODO: Investigate building from source instead of patching binaries.
|
||||
# TODO: Binary patching for not just x86_64-linux but also x86_64-darwin i686-linux
|
||||
|
||||
let drv = stdenv.mkDerivation rec {
|
||||
pname = "jetbrainsjdk";
|
||||
version = "520.38";
|
||||
|
||||
src = if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_5-linux-x64-b${version}.tar.gz";
|
||||
sha256 = "13hqp9ww9afkl70yrslyyx0z7fqcc8nrcqax69d6jaj587qfjqvz";
|
||||
}
|
||||
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
fetchurl {
|
||||
url = "https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_5-osx-x64-b${version}.tar.gz";
|
||||
sha256 = "1qrw4rpyznx7pkcjlfhi889l3a7gydz9yrqp6phz1rszmklpyk07";
|
||||
}
|
||||
else
|
||||
throw "unsupported system: ${stdenv.hostPlatform.system}";
|
||||
|
||||
nativeBuildInputs = [ file ];
|
||||
|
||||
unpackCmd = "mkdir jdk; pushd jdk; tar -xzf $src; popd";
|
||||
|
||||
installPhase = ''
|
||||
cd ..
|
||||
|
||||
mv $sourceRoot/jbrsdk $out
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString (!stdenv.isDarwin) ''
|
||||
find $out -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||
'';
|
||||
|
||||
rpath = lib.optionalString (!stdenv.isDarwin) (lib.makeLibraryPath ([
|
||||
stdenv.cc.cc stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt libGL
|
||||
alsaLib fontconfig freetype pango gtk2 cairo gdk-pixbuf atk zlib
|
||||
(placeholder "out")
|
||||
] ++ (with xorg; [
|
||||
libX11 libXext libXtst libXi libXp libXt libXrender libXxf86vm
|
||||
])) + ":${placeholder "out"}/lib/jli");
|
||||
|
||||
passthru.home = drv;
|
||||
{ stdenv, openjdk11, fetchFromGitHub, jetbrains }:
|
||||
|
||||
openjdk11.overrideAttrs (oldAttrs: rec {
|
||||
pname = "jetbrains-jdk";
|
||||
version = "11.0.6-b774";
|
||||
src = fetchFromGitHub {
|
||||
owner = "JetBrains";
|
||||
repo = "JetBrainsRuntime";
|
||||
rev = "jb${stdenv.lib.replaceStrings ["."] ["_"] version}";
|
||||
sha256 = "0lx3h74jwa14kr8ybwxbzc4jsjj6xnymvckdsrhqhvrciya7bxzw";
|
||||
};
|
||||
patches = [];
|
||||
meta = with stdenv.lib; {
|
||||
description = "An OpenJDK fork to better support Jetbrains's products.";
|
||||
longDescription = ''
|
||||
@@ -64,7 +25,10 @@ let drv = stdenv.mkDerivation rec {
|
||||
'';
|
||||
homepage = "https://bintray.com/jetbrains/intellij-jdk/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = with platforms; [ "x86_64-linux" "x86_64-darwin" ];
|
||||
maintainers = with maintainers; [ edwtjo petabyteboy ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
};
|
||||
}; in drv
|
||||
passthru = oldAttrs.passthru // {
|
||||
home = "${jetbrains.jdk}/lib/openjdk";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@ let
|
||||
pname = "clang";
|
||||
inherit version;
|
||||
|
||||
src = fetch "clang" "1w7ixr16a9f0g5kv4irvhwq973wn0d418kb0p9rabyfscm05wfmq";
|
||||
src = fetch "clang" "0ap63qhz0j6m63l4njwp055xni4s71dsxqi1w5d2p93hbswaiiw2";
|
||||
|
||||
unpackPhase = ''
|
||||
unpackFile $src
|
||||
@@ -36,7 +36,7 @@ let
|
||||
];
|
||||
|
||||
patches = [
|
||||
# 10.0.0rc3-only
|
||||
# 10.0.0 only, this should be present in 10.0.1
|
||||
./clang-extension-handling.patch
|
||||
|
||||
./purity.patch
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "compiler-rt";
|
||||
inherit version;
|
||||
src = fetch pname "0qv40mv91630l6f75w9g5y6v97s5shz94n82rms12gcd8mir6qp5";
|
||||
src = fetch pname "1g067yx8qz0bmf00b2xqjqaayqj2xvrjp9smms3a16syj9m0hfri";
|
||||
|
||||
nativeBuildInputs = [ cmake python3 llvm ];
|
||||
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
let
|
||||
release_version = "10.0.0";
|
||||
candidate = "rc3";
|
||||
candidate = "rc5";
|
||||
version = "10.0.0${candidate}"; # differentiating these is important for rc's
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
@@ -14,7 +14,7 @@ let
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "03669c93wzmbmfpv0pyzb7y4z1xc912l95iqywyx01xgdl1xws0r";
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "0x23q70c0xcwdhj0d66nisr8rqq69qcshrbb4si9pxfsm0zs9h3i";
|
||||
|
||||
tools = stdenv.lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||
@@ -30,16 +30,11 @@ let
|
||||
in {
|
||||
|
||||
llvm = callPackage ./llvm.nix { };
|
||||
llvm-polly = callPackage ./llvm.nix { enablePolly = true; };
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit (tools) lld;
|
||||
inherit clang-tools-extra_src;
|
||||
};
|
||||
clang-polly-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
llvm = tools.llvm-polly;
|
||||
};
|
||||
|
||||
llvm-manpages = lowPrio (tools.llvm.override {
|
||||
enableManpages = true;
|
||||
|
||||
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
|
||||
pname = "libc++";
|
||||
inherit version;
|
||||
|
||||
src = fetch "libcxx" "1cjxiby8nq95g02rgx08iy86pswpi66b9wmxqjiyga1s92nb19j0";
|
||||
src = fetch "libcxx" "0qw85sy3y1mcdrj8yd1j1gmskh0vs4xdgrx80niigizhr7030vxs";
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxxabi.src}
|
||||
|
||||
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
|
||||
pname = "libc++abi";
|
||||
inherit version;
|
||||
|
||||
src = fetch "libcxxabi" "1xs7dr91qzz7lq9am4q3vcj2jf1gx23ar1jbnhn763011hl94vs0";
|
||||
src = fetch "libcxxabi" "15iclzxjqfjynqxjg8dahyr0gfg83blv9dm7z9hq5ipxw8x2sglf";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
||||
|
||||
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
|
||||
pname = "libunwind";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "1dm7l75ajnjy6kbg2157v2g5gfia3n47fc56ayryyp2jdvbgprwl";
|
||||
src = fetch pname "12c2fh63afav8rfmplfs628r74ksfs8fjls655rwjsrg1hk0gy3l";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
pname = "lld";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "1w9c9xmzbdnkwgal612hqz2lxj9jgqpfzxr2rllcspmf6v7arvf4";
|
||||
src = fetch pname "08zg546872b432qrx49i7k1c2vdq9yjvc7gnrvy2nywv0d2qf9nc";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ llvm libxml2 ];
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation (rec {
|
||||
pname = "lldb";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "06qzh13cr20wrd5925698yq696bhl68zbvm7kjxp7c2rx5swxmg8";
|
||||
src = fetch pname "0swv16n7gm12f399f7hxai1jh89s14h3yg7cci10yaiibpvwk73x";
|
||||
|
||||
patches = [ ./lldb-procfs.patch ];
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
, enablePFM ? !(stdenv.isDarwin
|
||||
|| stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
|
||||
)
|
||||
, enablePolly ? false
|
||||
, enablePolly ? true
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -31,8 +31,8 @@ in stdenv.mkDerivation (rec {
|
||||
pname = "llvm";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "1pa322iwqg071gxdn5wxri263j6aki6ag36xbdzbyi3g8m8v8jci";
|
||||
polly_src = fetch "polly" "0p9dmv4hxwx4f5k1v4r9b5jp7fbi71ajpmrv3xf3vmp6m4i3r0pc";
|
||||
src = fetch pname "1abfi0zqbcwxf68dk00szpjxkcd44589va243af8sg97hljq6709";
|
||||
polly_src = fetch "polly" "1fzg5934km69rwam6vgznk0p4slzhr0icwmj3jibw3p93ppa8k9r";
|
||||
|
||||
unpackPhase = ''
|
||||
unpackFile $src
|
||||
|
||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "0axdxar18rvk9r4yx7y55ywqr3070mixag9sg2fcck1jzwfgymjb";
|
||||
src = fetch pname "0swif1plz7drjha6rdw02b60symsz95w62wxpiygbpdwsmhbbgam";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
@@ -23,7 +23,7 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux ''
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
@@ -50,8 +50,10 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [
|
||||
extraTools = [
|
||||
libstdcxxHook
|
||||
];
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
|
||||
@@ -23,7 +23,7 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux ''
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
@@ -50,8 +50,10 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [
|
||||
extraTools = [
|
||||
libstdcxxHook
|
||||
];
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
|
||||
|
||||
let
|
||||
|
||||
useLLVM = stdenv.hostPlatform.useLLVM or false;
|
||||
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
|
||||
inherit (stdenv.hostPlatform) isMusl;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "compiler-rt";
|
||||
inherit version;
|
||||
@@ -11,26 +20,34 @@ stdenv.mkDerivation {
|
||||
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
|
||||
];
|
||||
|
||||
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false || stdenv.isDarwin) [
|
||||
cmakeFlags = stdenv.lib.optionals (useLLVM || stdenv.isDarwin) [
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
|
||||
] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
|
||||
"-DCMAKE_C_COMPILER_WORKS=ON"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||
] ++ stdenv.lib.optionals (useLLVM) [
|
||||
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
#https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) ./crtbegin-and-end.patch
|
||||
] ++ stdenv.lib.optional (useLLVM) ./crtbegin-and-end.patch
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch;
|
||||
|
||||
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
|
||||
@@ -41,7 +58,7 @@ stdenv.mkDerivation {
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace cmake/config-ix.cmake \
|
||||
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||
'' + stdenv.lib.optionalString (useLLVM) ''
|
||||
substituteInPlace lib/builtins/int_util.c \
|
||||
--replace "#include <stdlib.h>" ""
|
||||
substituteInPlace lib/builtins/clear_cache.c \
|
||||
@@ -53,7 +70,7 @@ stdenv.mkDerivation {
|
||||
# Hack around weird upsream RPATH bug
|
||||
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
ln -s "$out/lib"/*/* "$out/lib"
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||
'' + stdenv.lib.optionalString (useLLVM) ''
|
||||
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o
|
||||
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o
|
||||
|
||||
@@ -23,7 +23,7 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc) ''
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
@@ -57,8 +57,10 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [
|
||||
extraTools = [
|
||||
libstdcxxHook
|
||||
];
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
|
||||
|
||||
let
|
||||
|
||||
useLLVM = stdenv.hostPlatform.useLLVM or false;
|
||||
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
|
||||
inherit (stdenv.hostPlatform) isMusl;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "compiler-rt";
|
||||
inherit version;
|
||||
@@ -11,27 +20,26 @@ stdenv.mkDerivation {
|
||||
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
|
||||
];
|
||||
|
||||
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
cmakeFlags = stdenv.lib.optionals (useLLVM || stdenv.isDarwin) [
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
|
||||
"-DCMAKE_C_COMPILER_WORKS=ON"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||
] ++ stdenv.lib.optionals (useLLVM) [
|
||||
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
#https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.parsed.kernel.name == "none") [
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
];
|
||||
|
||||
@@ -40,7 +48,7 @@ stdenv.mkDerivation {
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) ./crtbegin-and-end.patch;
|
||||
++ stdenv.lib.optional (useLLVM) ./crtbegin-and-end.patch;
|
||||
|
||||
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
|
||||
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
|
||||
@@ -50,7 +58,7 @@ stdenv.mkDerivation {
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace cmake/config-ix.cmake \
|
||||
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||
'' + stdenv.lib.optionalString (useLLVM) ''
|
||||
substituteInPlace lib/builtins/int_util.c \
|
||||
--replace "#include <stdlib.h>" ""
|
||||
substituteInPlace lib/builtins/clear_cache.c \
|
||||
@@ -62,7 +70,7 @@ stdenv.mkDerivation {
|
||||
# Hack around weird upsream RPATH bug
|
||||
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
|
||||
ln -s "$out/lib"/*/* "$out/lib"
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||
'' + stdenv.lib.optionalString (useLLVM) ''
|
||||
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
|
||||
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
|
||||
|
||||
@@ -57,8 +57,10 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [
|
||||
extraTools = [
|
||||
libstdcxxHook
|
||||
];
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
|
||||
|
||||
let
|
||||
|
||||
useLLVM = stdenv.hostPlatform.useLLVM or false;
|
||||
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
|
||||
inherit (stdenv.hostPlatform) isMusl;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "compiler-rt";
|
||||
inherit version;
|
||||
@@ -11,27 +20,26 @@ stdenv.mkDerivation rec {
|
||||
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
|
||||
];
|
||||
|
||||
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
cmakeFlags = stdenv.lib.optionals (useLLVM || stdenv.isDarwin) [
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
|
||||
"-DCMAKE_C_COMPILER_WORKS=ON"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||
] ++ stdenv.lib.optionals (useLLVM) [
|
||||
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
#https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
|
||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.parsed.kernel.name == "none") [
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
];
|
||||
|
||||
@@ -49,7 +57,7 @@ stdenv.mkDerivation rec {
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace cmake/config-ix.cmake \
|
||||
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||
'' + stdenv.lib.optionalString (useLLVM) ''
|
||||
substituteInPlace lib/builtins/int_util.c \
|
||||
--replace "#include <stdlib.h>" ""
|
||||
substituteInPlace lib/builtins/clear_cache.c \
|
||||
@@ -61,7 +69,7 @@ stdenv.mkDerivation rec {
|
||||
# Hack around weird upsream RPATH bug
|
||||
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
|
||||
ln -s "$out/lib"/*/* "$out/lib"
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||
'' + stdenv.lib.optionalString (useLLVM) ''
|
||||
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
|
||||
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
|
||||
|
||||
@@ -57,8 +57,10 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
extraPackages = [
|
||||
extraTools = [
|
||||
libstdcxxHook
|
||||
];
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
|
||||
, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
|
||||
, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
|
||||
, libXcursor, libXrandr, fontconfig, openjdk11
|
||||
, setJavaClassPath
|
||||
, headless ? false
|
||||
, enableJavaFX ? openjfx.meta.available, openjfx
|
||||
, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
|
||||
}:
|
||||
|
||||
let
|
||||
major = "12";
|
||||
update = ".0.2";
|
||||
build = "ga";
|
||||
|
||||
openjdk = stdenv.mkDerivation rec {
|
||||
pname = "openjdk" + lib.optionalString headless "-headless";
|
||||
version = "${major}${update}-${build}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
|
||||
sha256 = "1ndlxmikyy298z7lqpr1bd0zxq7yx6xidj8y3c8mw9m9fy64h9c7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoconf ];
|
||||
buildInputs = [
|
||||
cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
|
||||
libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
|
||||
libXi libXinerama libXcursor libXrandr fontconfig openjdk11
|
||||
] ++ lib.optionals (!headless && enableGnome2) [
|
||||
gtk3 gnome_vfs GConf glib
|
||||
];
|
||||
|
||||
patches = [
|
||||
./fix-java-home-jdk10.patch
|
||||
./read-truststore-from-env-jdk10.patch
|
||||
./currency-date-range-jdk10.patch
|
||||
./increase-javadoc-heap.patch
|
||||
# -Wformat etc. are stricter in newer gccs, per
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
|
||||
# so grab the work-around from
|
||||
# https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24
|
||||
(fetchurl {
|
||||
url = https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch;
|
||||
sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
|
||||
})
|
||||
] ++ lib.optionals (!headless && enableGnome2) [
|
||||
./swing-use-gtk-jdk10.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
chmod +x configure
|
||||
patchShebangs --build configure
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-boot-jdk=${openjdk11.home}"
|
||||
"--enable-unlimited-crypto"
|
||||
"--with-native-debug-symbols=internal"
|
||||
"--with-libjpeg=system"
|
||||
"--with-giflib=system"
|
||||
"--with-libpng=system"
|
||||
"--with-zlib=system"
|
||||
"--with-lcms=system"
|
||||
"--with-stdc++lib=dynamic"
|
||||
] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
|
||||
++ lib.optional headless "--enable-headless-only"
|
||||
++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
|
||||
|
||||
NIX_LDFLAGS = lib.optionals (!headless) [
|
||||
"-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
|
||||
] ++ lib.optionals (!headless && enableGnome2) [
|
||||
"-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
|
||||
];
|
||||
|
||||
buildFlags = [ "all" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
|
||||
mv build/*/images/jdk $out/lib/openjdk
|
||||
|
||||
# Remove some broken manpages.
|
||||
rm -rf $out/lib/openjdk/man/ja*
|
||||
|
||||
# Mirror some stuff in top-level.
|
||||
mkdir -p $out/share
|
||||
ln -s $out/lib/openjdk/include $out/include
|
||||
ln -s $out/lib/openjdk/man $out/share/man
|
||||
|
||||
# jni.h expects jni_md.h to be in the header search path.
|
||||
ln -s $out/include/linux/*_md.h $out/include/
|
||||
|
||||
# Remove crap from the installation.
|
||||
rm -rf $out/lib/openjdk/demo
|
||||
${lib.optionalString headless ''
|
||||
rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
|
||||
''}
|
||||
|
||||
ln -s $out/lib/openjdk/bin $out/bin
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
# Propagate the setJavaClassPath setup hook so that any package
|
||||
# that depends on the JDK has $CLASSPATH set up properly.
|
||||
mkdir -p $out/nix-support
|
||||
#TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
|
||||
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Build the set of output library directories to rpath against
|
||||
LIBDIRS=""
|
||||
for output in $outputs; do
|
||||
if [ "$output" = debug ]; then continue; fi
|
||||
LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
|
||||
done
|
||||
# Add the local library paths to remove dependencies on the bootstrap
|
||||
for output in $outputs; do
|
||||
if [ "$output" = debug ]; then continue; fi
|
||||
OUTPUTDIR=$(eval echo \$$output)
|
||||
BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
|
||||
echo "$BINLIBS" | while read i; do
|
||||
patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
|
||||
patchelf --shrink-rpath "$i" || true
|
||||
done
|
||||
done
|
||||
'';
|
||||
|
||||
disallowedReferences = [ openjdk11 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://openjdk.java.net/;
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
home = "${openjdk}/lib/openjdk";
|
||||
};
|
||||
};
|
||||
in openjdk
|
||||
@@ -7,11 +7,11 @@ let
|
||||
};
|
||||
|
||||
jdk = stdenv.mkDerivation rec {
|
||||
name = "zulu12.1.3-ca-jdk12";
|
||||
name = "zulu13.29.9-ca-jdk13.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.azul.com/zulu/bin/${name}-macosx_x64.tar.gz";
|
||||
sha256 = "05q3v4vwjd7xhqr21bzlip5x4xhq5rpdshfpb8i86n4zvn7l0mxy";
|
||||
sha256 = "1x8ja3x880a1izrwi7bdrwz1ljdvracjx627slzjd2xk8c4211pf";
|
||||
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
|
||||
, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
|
||||
, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
|
||||
, libXcursor, libXrandr, fontconfig, openjdk11
|
||||
, libXcursor, libXrandr, fontconfig, openjdk13-bootstrap
|
||||
, setJavaClassPath
|
||||
, headless ? false
|
||||
, enableJavaFX ? openjfx.meta.available, openjfx
|
||||
@@ -9,24 +9,24 @@
|
||||
}:
|
||||
|
||||
let
|
||||
major = "12";
|
||||
major = "13";
|
||||
update = ".0.2";
|
||||
build = "ga";
|
||||
build = "-ga";
|
||||
|
||||
openjdk = stdenv.mkDerivation rec {
|
||||
pname = "openjdk" + lib.optionalString headless "-headless";
|
||||
version = "${major}${update}-${build}";
|
||||
version = "${major}${update}${build}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
|
||||
sha256 = "1ndlxmikyy298z7lqpr1bd0zxq7yx6xidj8y3c8mw9m9fy64h9c7";
|
||||
sha256 = "1871ziss7ny19rw8f7bay5vznmhpqbfi4ihn3yygs06wyxhm0zmv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoconf ];
|
||||
buildInputs = [
|
||||
cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
|
||||
libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
|
||||
libXi libXinerama libXcursor libXrandr fontconfig openjdk11
|
||||
libXi libXinerama libXcursor libXrandr fontconfig openjdk13-bootstrap
|
||||
] ++ lib.optionals (!headless && enableGnome2) [
|
||||
gtk3 gnome_vfs GConf glib
|
||||
];
|
||||
@@ -35,7 +35,7 @@ let
|
||||
./fix-java-home-jdk10.patch
|
||||
./read-truststore-from-env-jdk10.patch
|
||||
./currency-date-range-jdk10.patch
|
||||
./increase-javadoc-heap.patch
|
||||
./increase-javadoc-heap-jdk13.patch
|
||||
# -Wformat etc. are stricter in newer gccs, per
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
|
||||
# so grab the work-around from
|
||||
@@ -45,7 +45,7 @@ let
|
||||
sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
|
||||
})
|
||||
] ++ lib.optionals (!headless && enableGnome2) [
|
||||
./swing-use-gtk-jdk10.patch
|
||||
./swing-use-gtk-jdk13.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
@@ -54,7 +54,7 @@ let
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-boot-jdk=${openjdk11.home}"
|
||||
"--with-boot-jdk=${openjdk13-bootstrap.home}"
|
||||
"--enable-unlimited-crypto"
|
||||
"--with-native-debug-symbols=internal"
|
||||
"--with-libjpeg=system"
|
||||
@@ -137,7 +137,7 @@ let
|
||||
done
|
||||
'';
|
||||
|
||||
disallowedReferences = [ openjdk11 ];
|
||||
disallowedReferences = [ openjdk13-bootstrap ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://openjdk.java.net/;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -uw -r a/make/Docs.gmk b/make/Docs.gmk
|
||||
--- a/make/Docs.gmk 2019-10-09 08:05:43.107349180 -0400
|
||||
+++ b/make/Docs.gmk 2019-10-09 08:09:29.330118790 -0400
|
||||
@@ -277,7 +277,7 @@
|
||||
$1_ALL_MODULES := $$(sort $$($1_MODULES) $$($1_INDIRECT_EXPORTS))
|
||||
|
||||
$1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION) \
|
||||
- -Djspec.version=$$(VERSION_SPECIFICATION)
|
||||
+ -Djspec.version=$$(VERSION_SPECIFICATION) -Xmx1G
|
||||
|
||||
ifeq ($$(ENABLE_FULL_DOCS), true)
|
||||
# Tell the ModuleGraph taglet to generate html links to soon-to-be-created
|
||||
@@ -29,6 +29,9 @@ let
|
||||
JDK_HOME = ${openjdk11-bootstrap.home}
|
||||
'' + args.gradleProperties or "");
|
||||
|
||||
#avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
|
||||
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
|
||||
+13
-7
@@ -3,9 +3,9 @@
|
||||
, ffmpeg, python, ruby }:
|
||||
|
||||
let
|
||||
major = "12";
|
||||
update = "";
|
||||
build = "14";
|
||||
major = "13";
|
||||
update = ".0.2";
|
||||
build = "1";
|
||||
repover = "${major}${update}+${build}";
|
||||
gradle_ = (gradleGen.override {
|
||||
java = openjdk11_headless;
|
||||
@@ -15,8 +15,8 @@ let
|
||||
version = "${major}${update}-${build}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://hg.openjdk.java.net/openjfx/${major}/rt/archive/${repover}.tar.gz";
|
||||
sha256 = "16jjfjkrg57wsj9mmm52i2kl3byz3ba1f9f8wwc8zwqm4cpjzliz";
|
||||
url = "https://hg.openjdk.java.net/openjfx/${major}-dev/rt/archive/${repover}.tar.gz";
|
||||
sha256 = "1si9wpb9malnf8zzz57l6b80088z2370zfxp1b0kk6rs0cnvpr74";
|
||||
};
|
||||
|
||||
buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsaLib ffmpeg ];
|
||||
@@ -29,6 +29,9 @@ let
|
||||
JDK_HOME = ${openjdk11_headless.home}
|
||||
'' + args.gradleProperties or "");
|
||||
|
||||
#avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
|
||||
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
@@ -59,8 +62,8 @@ let
|
||||
outputHashMode = "recursive";
|
||||
# Downloaded AWT jars differ by platform.
|
||||
outputHash = {
|
||||
x86_64-linux = "1z5qar5l28ja4pkf5l5m48xbv3x1yrnilsv9lpf2j3vkdk9h1nci";
|
||||
i686-linux = "0rbygvjc7w197fi5nxldqdrm6mpiyd3n45042g3gd4s5qk08spjd";
|
||||
x86_64-linux = "077zss95iq6iskx7ghz1c57ymydpzj0wm7r1pkznw99l9xwvdmqi";
|
||||
i686-linux = "03gglr2sh77cyg16qw9g45ji33dg7i93s5s30hz3mh420g112qa0";
|
||||
}.${stdenv.system} or (throw "Unsupported platform");
|
||||
};
|
||||
|
||||
@@ -72,6 +75,9 @@ in makePackage {
|
||||
COMPILE_WEBKIT = true
|
||||
'';
|
||||
|
||||
#openjdk build fails if licenses are identical, so we must patch this trivial difference
|
||||
patches = [ ./openjfx-mesa-license.patch ];
|
||||
|
||||
preBuild = ''
|
||||
swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)"
|
||||
substituteInPlace build.gradle \
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/modules/javafx.graphics/src/main/legal/mesa3d.md 1969-12-31 19:00:01.000000000 -0500
|
||||
+++ b/modules/javafx.graphics/src/main/legal/mesa3d.md 2019-08-08 01:05:04.000000000 -0400
|
||||
@@ -1,7 +1,7 @@
|
||||
## Mesa 3-D Graphics Library v5.0
|
||||
|
||||
### Mesa License
|
||||
-```
|
||||
+<pre>
|
||||
|
||||
Mesa 3-D graphics library
|
||||
Version: 5.0
|
||||
@@ -25,4 +25,4 @@
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-```
|
||||
+</pre>
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/src/java.desktop/share/classes/javax/swing/UIManager.java 2019-08-08 01:05:04.000000000 -0400
|
||||
+++ b/src/java.desktop/share/classes/javax/swing/UIManager.java 2019-10-09 08:20:31.791606748 -0400
|
||||
@@ -660,9 +660,8 @@
|
||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||
if (toolkit instanceof SunToolkit) {
|
||||
SunToolkit suntk = (SunToolkit)toolkit;
|
||||
- String desktop = suntk.getDesktop();
|
||||
boolean gtkAvailable = suntk.isNativeGTKAvailable();
|
||||
- if ("gnome".equals(desktop) && gtkAvailable) {
|
||||
+ if (gtkAvailable) {
|
||||
return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
|
||||
}
|
||||
}
|
||||
@@ -1397,7 +1396,7 @@
|
||||
lafName = lafData.remove("defaultlaf");
|
||||
}
|
||||
if (lafName == null) {
|
||||
- lafName = getCrossPlatformLookAndFeelClassName();
|
||||
+ lafName = getSystemLookAndFeelClassName();
|
||||
}
|
||||
lafName = swingProps.getProperty(defaultLAFKey, lafName);
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import ./default.nix {
|
||||
rustcVersion = "1.38.0";
|
||||
rustcSha256 = "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4";
|
||||
enableRustcDev = false;
|
||||
|
||||
# Note: the version MUST be one version prior to the version we're
|
||||
# building
|
||||
bootstrapVersion = "1.37.0";
|
||||
|
||||
# fetch hashes by running `print-hashes.sh 1.37.0`
|
||||
bootstrapHashes = {
|
||||
i686-unknown-linux-gnu = "74510e0e52a55e65a9f716673c2cda4d2bd427e2453541c6993c77c3ec04acf9";
|
||||
x86_64-unknown-linux-gnu = "cb573229bfd32928177c3835fdeb62d52da64806b844bc1095c6225b0665a1cb";
|
||||
arm-unknown-linux-gnueabihf = "272739fbb23cf6c2040c1813af9c8c7f386cac37d9de638f22a1816eb96bc0ae";
|
||||
armv7-unknown-linux-gnueabihf = "5b87b877f0ed20c6a09ce26e7a15d8c61b26b62484b97e78a51099d0efefec98";
|
||||
aarch64-unknown-linux-gnu = "263ef98fa3a6b2911b56f89c06615cdebf6ef676eb9b2493ad1539602f79b6ba";
|
||||
i686-apple-darwin = "e45d0c4d882fc6c404ffa6fe790294f4ea96384a2b48804adbf723f3635477a8";
|
||||
x86_64-apple-darwin = "b2310c97ffb964f253c4088c8d29865f876a49da2a45305493af5b5c7a3ca73d";
|
||||
};
|
||||
|
||||
selectRustPackage = pkgs: pkgs.rust_1_38;
|
||||
}
|
||||
@@ -18,8 +18,9 @@
|
||||
"armv7a" = "armv7";
|
||||
"armv7l" = "armv7";
|
||||
"armv6l" = "arm";
|
||||
}.${cpu.name} or cpu.name;
|
||||
in "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
|
||||
}.${cpu.name} or platform.rustc.arch or cpu.name;
|
||||
in platform.rustc.config
|
||||
or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
|
||||
|
||||
makeRustPlatform = { rustc, cargo, ... }: rec {
|
||||
rust = {
|
||||
@@ -30,14 +31,8 @@
|
||||
inherit cargo;
|
||||
};
|
||||
|
||||
# N.B. This is a legacy fetcher implementation that is being phased out and deleted.
|
||||
# See ../../../build-support/rust/README.md for details.
|
||||
fetchcargo = buildPackages.callPackage ../../../build-support/rust/fetchcargo.nix {
|
||||
inherit cargo;
|
||||
};
|
||||
|
||||
buildRustPackage = callPackage ../../../build-support/rust {
|
||||
inherit rustc cargo fetchcargo fetchCargoTarball;
|
||||
inherit rustc cargo fetchCargoTarball;
|
||||
};
|
||||
|
||||
rustcSrc = callPackage ./rust-src.nix {
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "tinygo";
|
||||
version = "0.11.0";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tinygo-org";
|
||||
repo = "tinygo";
|
||||
rev = "v${version}";
|
||||
sha256 = "0cmg8x9hpvzlxp6hiy9hkh9nn7ig7b0x6k8a2c3bw19pfx9lxksf";
|
||||
sha256 = "0dw3kxf55p617pb0bj3knsqcfvap5scxlvhh3a9g9ia92kann4v1";
|
||||
};
|
||||
|
||||
modSha256 = "0r3lfi1bj550sf3b7ysz62c2c33f8zfli8208xixj3jadycb6r3z";
|
||||
modSha256 = "1bjq4vaf38hi204lr9w3r3wcy1rzj06ygi5gzfa7dl3kx10hw6p0";
|
||||
enableParallelBuilding = true;
|
||||
subPackages = [ "." ];
|
||||
buildInputs = [ llvm clang-unwrapped makeWrapper ];
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yosys";
|
||||
version = "2020.02.25";
|
||||
pname = "yosys";
|
||||
version = "2020.03.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "YosysHQ";
|
||||
repo = "yosys";
|
||||
rev = "6edca05793197a846bbfb0329e836c87fa5aabb6";
|
||||
sha256 = "1cwps3nsld80bh2b66l8fx3fa2zsx174mw72kqxyihpfdm0m0z1s";
|
||||
rev = "ed4fa19ba2812c286562baf26bbbcb49afad83bc";
|
||||
sha256 = "1sza5ng0q8dy6p4hks9b2db129xjcid9n6l8aglf2cj5ks82k5nv";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
# we have to do this ourselves for some reason...
|
||||
(cd misc && ${protobuf}/bin/protoc --cpp_out ../backends/protobuf/ ./yosys.proto)
|
||||
|
||||
if ! grep -q "ABCREV = ${shortAbcRev}" Makefile;then
|
||||
if ! grep -q "ABCREV = ${shortAbcRev}" Makefile; then
|
||||
echo "yosys isn't compatible with the provided abc (${shortAbcRev}), failing."
|
||||
exit 1
|
||||
fi
|
||||
@@ -60,20 +60,21 @@ stdenv.mkDerivation rec {
|
||||
doCheck = true;
|
||||
checkInputs = [ verilog ];
|
||||
|
||||
meta = {
|
||||
description = "Framework for RTL synthesis tools";
|
||||
longDescription = ''
|
||||
Yosys is a framework for RTL synthesis tools. It currently has
|
||||
extensive Verilog-2005 support and provides a basic set of
|
||||
synthesis algorithms for various application domains.
|
||||
Yosys can be adapted to perform any synthesis job by combining
|
||||
the existing passes (algorithms) using synthesis scripts and
|
||||
adding additional passes as needed by extending the yosys C++
|
||||
code base.
|
||||
'';
|
||||
homepage = http://www.clifford.at/yosys/;
|
||||
license = stdenv.lib.licenses.isc;
|
||||
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice emily ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
# Internally, yosys knows to use the specified hardcoded ABCEXTERNAL binary.
|
||||
# But other tools (like mcy or symbiyosys) can't know how yosys was built, so
|
||||
# they just assume that 'yosys-abc' is available -- but it's not installed
|
||||
# when using ABCEXTERNAL
|
||||
#
|
||||
# add a symlink to fake things so that both variants work the same way.
|
||||
postInstall = ''
|
||||
ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Open RTL synthesis framework and tools";
|
||||
homepage = "http://www.clifford.at/yosys/";
|
||||
license = licenses.isc;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ shell thoughtpolice emily ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user