uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,113 @@
{ lib, stdenv
, makeWrapper
, runCommand, wrapBintoolsWith, wrapCCWith
, buildAndroidndk, androidndk, targetAndroidndkPkgs
}:
let
# Mapping from a platform to information needed to unpack NDK stuff for that
# platform.
#
# N.B. The Android NDK uses slightly different LLVM-style platform triples
# than we do. We don't just use theirs because ours are less ambiguous and
# some builds need that clarity.
ndkInfoFun = { config, ... }: {
x86_64-apple-darwin = {
double = "darwin-x86_64";
};
x86_64-unknown-linux-gnu = {
double = "linux-x86_64";
};
i686-unknown-linux-android = {
triple = "i686-linux-android";
arch = "x86";
toolchain = "x86";
gccVer = "4.9";
};
x86_64-unknown-linux-android = {
triple = "x86_64-linux-android";
arch = "x86_64";
toolchain = "x86_64";
gccVer = "4.9";
};
armv7a-unknown-linux-androideabi = {
arch = "arm";
triple = "arm-linux-androideabi";
toolchain = "arm-linux-androideabi";
gccVer = "4.9";
};
aarch64-unknown-linux-android = {
arch = "arm64";
triple = "aarch64-linux-android";
toolchain = "aarch64-linux-android";
gccVer = "4.9";
};
}.${config} or
(throw "Android NDK doesn't support ${config}, as far as we know");
hostInfo = ndkInfoFun stdenv.hostPlatform;
targetInfo = ndkInfoFun stdenv.targetPlatform;
prefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) (stdenv.targetPlatform.config + "-");
in
rec {
# Misc tools
binaries = runCommand "ndk-toolchain-binutils" {
pname = "ndk-toolchain-binutils";
inherit (androidndk) version;
isClang = true; # clang based cc, but bintools ld
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = [ androidndk ];
} ''
mkdir -p $out/bin
# llvm toolchain
for prog in ${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/${hostInfo.double}/bin/*; do
ln -s $prog $out/bin/$(basename $prog)
ln -s $prog $out/bin/${prefix}$(basename $prog)
done
# bintools toolchain
for prog in ${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/${targetInfo.toolchain}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/bin/*; do
prog_suffix=$(basename $prog | sed 's/${targetInfo.triple}-//')
ln -s $prog $out/bin/${stdenv.targetPlatform.config}-$prog_suffix
done
# shitty googly wrappers
rm -f $out/bin/${stdenv.targetPlatform.config}-gcc $out/bin/${stdenv.targetPlatform.config}-g++
'';
binutils = wrapBintoolsWith {
bintools = binaries;
libc = targetAndroidndkPkgs.libraries;
};
clang = wrapCCWith {
cc = binaries // {
# for packages expecting libcompiler-rt, etc. to come from here (stdenv.cc.cc.lib)
lib = targetAndroidndkPkgs.libraries;
};
bintools = binutils;
libc = targetAndroidndkPkgs.libraries;
extraBuildCommands = ''
echo "-D__ANDROID_API__=${stdenv.targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags
echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
echo "-resource-dir=$(echo ${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/${hostInfo.double}/lib*/clang/*)" >> $out/nix-support/cc-cflags
echo "--gcc-toolchain=${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/${targetInfo.toolchain}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}" >> $out/nix-support/cc-cflags
'';
};
# Bionic lib C and other libraries.
#
# We use androidndk from the previous stage, else we waste time or get cycles
# cross-compiling packages to wrap incorrectly wrap binaries we don't include
# anyways.
libraries = runCommand "bionic-prebuilt" {} ''
mkdir -p $out
cp -r ${buildAndroidndk}/libexec/android-sdk/ndk-bundle/sysroot/usr/include $out/include
chmod +w $out/include
cp -r ${buildAndroidndk}/libexec/android-sdk/ndk-bundle/sysroot/usr/include/${targetInfo.triple}/* $out/include
ln -s ${buildAndroidndk}/libexec/android-sdk/ndk-bundle/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/${if hostInfo.arch == "x86_64" then "lib64" else "lib"} $out/lib
'';
}

View file

@ -0,0 +1,65 @@
{ lib, androidenv, buildPackages, pkgs, targetPackages
}:
{
"18b" =
let
ndkVersion = "18.1.5063045";
buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
includeNDK = true;
inherit ndkVersion;
};
androidComposition = androidenv.composeAndroidPackages {
includeNDK = true;
inherit ndkVersion;
};
in
import ./androidndk-pkgs.nix {
inherit lib;
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
stdenv
runCommand wrapBintoolsWith wrapCCWith;
# buildPackages.foo rather than buildPackages.buildPackages.foo would work,
# but for splicing messing up on infinite recursion for the variants we
# *dont't* use. Using this workaround, but also making a test to ensure
# these two really are the same.
buildAndroidndk = buildAndroidComposition.ndk-bundle;
androidndk = androidComposition.ndk-bundle;
targetAndroidndkPkgs = targetPackages.androidndkPkgs_18b;
};
"21" =
let
ndkVersion = "21.0.6113669";
buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
includeNDK = true;
inherit ndkVersion;
};
androidComposition = androidenv.composeAndroidPackages {
includeNDK = true;
inherit ndkVersion;
};
in
import ./androidndk-pkgs.nix {
inherit lib;
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
stdenv
runCommand wrapBintoolsWith wrapCCWith;
# buildPackages.foo rather than buildPackages.buildPackages.foo would work,
# but for splicing messing up on infinite recursion for the variants we
# *dont't* use. Using this workaround, but also making a test to ensure
# these two really are the same.
buildAndroidndk = buildAndroidComposition.ndk-bundle;
androidndk = androidComposition.ndk-bundle;
targetAndroidndkPkgs = targetPackages.androidndkPkgs_21;
};
}

View file

@ -0,0 +1,110 @@
{ stdenv, writeText, erlang, perl, which, gitMinimal, wget, lib }:
{ name
, version
, src
, setupHook ? null
, buildInputs ? [ ]
, beamDeps ? [ ]
, postPatch ? ""
, compilePorts ? false
, installPhase ? null
, buildPhase ? null
, configurePhase ? null
, meta ? { }
, enableDebugInfo ? false
, buildFlags ? [ ]
, ...
}@attrs:
with lib;
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info";
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
pkg = self: stdenv.mkDerivation (attrs // {
app_name = name;
name = "${name}-${version}";
inherit version;
dontStrip = true;
inherit src;
setupHook =
if setupHook == null
then
writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib"
''
else setupHook;
buildInputs = buildInputs ++ [ erlang perl which gitMinimal wget ];
propagatedBuildInputs = beamDeps;
buildFlags = [ "SKIP_DEPS=1" ]
++ lib.optional (enableDebugInfo || erlang.debugInfo) ''ERL_OPTS="$ERL_OPTS +debug_info"''
++ buildFlags;
configurePhase =
if configurePhase == null
then ''
runHook preConfigure
# We shouldnt need to do this, but it seems at times there is a *.app in
# the repo/package. This ensures we start from a clean slate
make SKIP_DEPS=1 clean
runHook postConfigure
''
else configurePhase;
buildPhase =
if buildPhase == null
then ''
runHook preBuild
make $buildFlags "''${buildFlagsArray[@]}"
runHook postBuild
''
else buildPhase;
installPhase =
if installPhase == null
then ''
runHook preInstall
mkdir -p $out/lib/erlang/lib/${name}
cp -r ebin $out/lib/erlang/lib/${name}/
cp -r src $out/lib/erlang/lib/${name}/
if [ -d include ]; then
cp -r include $out/lib/erlang/lib/${name}/
fi
if [ -d priv ]; then
cp -r priv $out/lib/erlang/lib/${name}/
fi
if [ -d doc ]; then
cp -r doc $out/lib/erlang/lib/${name}/
fi
runHook postInstall
''
else installPhase;
passthru = {
packageName = name;
env = shell self;
inherit beamDeps;
};
});
in
fix pkg

View file

@ -0,0 +1,20 @@
{ lib, buildRebar3, fetchHex }:
{ name, version, sha256
, builder ? buildRebar3
, hexPkg ? name
, ... }@attrs:
with lib;
let
pkg = self: builder (attrs // {
src = fetchHex {
pkg = hexPkg;
inherit version;
inherit sha256;
};
});
in
fix pkg

View file

@ -0,0 +1,94 @@
{ stdenv, writeText, elixir, erlang, hex, lib }:
{ name
, version
, src
, buildInputs ? [ ]
, nativeBuildInputs ? [ ]
, beamDeps ? [ ]
, propagatedBuildInputs ? [ ]
, postPatch ? ""
, compilePorts ? false
, meta ? { }
, enableDebugInfo ? false
, mixEnv ? "prod"
, ...
}@attrs:
with lib;
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
pkg = self: stdenv.mkDerivation (attrs // {
name = "${name}-${version}";
inherit version src;
MIX_ENV = mixEnv;
MIX_DEBUG = if enableDebugInfo then 1 else 0;
HEX_OFFLINE = 1;
# add to ERL_LIBS so other modules can find at runtime.
# http://erlang.org/doc/man/code.html#code-path
# Mix also searches the code path when compiling with the --no-deps-check flag
setupHook = attrs.setupHook or
writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib"
'';
buildInputs = buildInputs ++ [ ];
nativeBuildInputs = nativeBuildInputs ++ [ elixir hex ];
propagatedBuildInputs = propagatedBuildInputs ++ beamDeps;
configurePhase = attrs.configurePhase or ''
runHook preConfigure
${./mix-configure-hook.sh}
runHook postConfigure
'';
buildPhase = attrs.buildPhase or ''
runHook preBuild
export HEX_HOME="$TEMPDIR/hex"
export MIX_HOME="$TEMPDIR/mix"
mix compile --no-deps-check
runHook postBuild
'';
installPhase = attrs.installPhase or ''
runHook preInstall
# This uses the install path convention established by nixpkgs maintainers
# for all beam packages. Changing this will break compatibility with other
# builder functions like buildRebar3 and buildErlangMk.
mkdir -p "$out/lib/erlang/lib/${name}-${version}"
# Some packages like db_connection will use _build/shared instead of
# honoring the $MIX_ENV variable.
for reldir in _build/{$MIX_ENV,shared}/lib/${name}/{src,ebin,priv,include} ; do
if test -d $reldir ; then
# Some builds produce symlinks (eg: phoenix priv dircetory). They must
# be followed with -H flag.
cp -Hrt "$out/lib/erlang/lib/${name}-${version}" "$reldir"
fi
done
runHook postInstall
'';
# stripping does not have any effect on beam files
# it is however needed for dependencies with NIFs like bcrypt for example
dontStrip = false;
passthru = {
packageName = name;
env = shell self;
inherit beamDeps;
};
});
in
fix pkg

View file

@ -0,0 +1,88 @@
{ stdenv, writeText, erlang, rebar3WithPlugins, openssl, libyaml, lib }:
{ name
, version
, src
, setupHook ? null
, buildInputs ? [ ]
, beamDeps ? [ ]
, buildPlugins ? [ ]
, postPatch ? ""
, installPhase ? null
, buildPhase ? null
, configurePhase ? null
, meta ? { }
, enableDebugInfo ? false
, ...
}@attrs:
with lib;
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";
rebar3 = rebar3WithPlugins {
plugins = buildPlugins;
};
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
customPhases = filterAttrs
(_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; };
pkg = self: stdenv.mkDerivation (attrs // {
name = "${name}-${version}";
inherit version;
buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
propagatedBuildInputs = unique beamDeps;
inherit src;
# stripping does not have any effect on beam files
# it is however needed for dependencies with NIFs
# false is the default but we keep this for readability
dontStrip = false;
setupHook = writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
'';
postPatch = ''
rm -f rebar rebar3
'' + postPatch;
buildPhase = ''
runHook preBuild
HOME=. rebar3 bare compile -path ""
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/erlang/lib/${name}-${version}"
for reldir in src ebin priv include; do
[ -d "$reldir" ] || continue
# $out/lib/erlang/lib is a convention used in nixpkgs for compiled BEAM packages
cp -Hrt "$out/lib/erlang/lib/${name}-${version}" "$reldir"
done
runHook postInstall
'';
meta = {
inherit (erlang.meta) platforms;
} // meta;
passthru = {
packageName = name;
env = shell self;
inherit beamDeps;
};
} // customPhases);
in
fix pkg

View file

@ -0,0 +1,86 @@
{ lib, pkgs, erlang }:
let
inherit (lib) makeExtensible;
lib' = pkgs.callPackage ./lib.nix { };
# FIXME: add support for overrideScope
callPackageWithScope = scope: drv: args: lib.callPackageWith scope drv args;
mkScope = scope: pkgs // scope;
packages = self:
let
defaultScope = mkScope self;
callPackage = drv: args: callPackageWithScope defaultScope drv args;
in
rec {
inherit callPackage erlang;
beamPackages = self;
inherit (callPackage ../tools/build-managers/rebar3 { }) rebar3 rebar3WithPlugins;
rebar = callPackage ../tools/build-managers/rebar { };
pc = callPackage ./pc { };
rebar3-proper = callPackage ./rebar3-proper { };
rebar3-nix = callPackage ./rebar3-nix { };
fetchHex = callPackage ./fetch-hex.nix { };
fetchRebar3Deps = callPackage ./fetch-rebar-deps.nix { };
rebar3Relx = callPackage ./rebar3-release.nix { };
buildRebar3 = callPackage ./build-rebar3.nix { };
buildHex = callPackage ./build-hex.nix { };
buildErlangMk = callPackage ./build-erlang-mk.nix { };
buildMix = callPackage ./build-mix.nix { };
fetchMixDeps = callPackage ./fetch-mix-deps.nix { };
mixRelease = callPackage ./mix-release.nix { };
erlang-ls = callPackage ./erlang-ls { };
erlfmt = callPackage ./erlfmt { };
elvis-erlang = callPackage ./elvis-erlang { };
# BEAM-based languages.
elixir = elixir_1_13;
elixir_1_13 = lib'.callElixir ../interpreters/elixir/1.13.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_12 = lib'.callElixir ../interpreters/elixir/1.12.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_11 = lib'.callElixir ../interpreters/elixir/1.11.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_10 = lib'.callElixir ../interpreters/elixir/1.10.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_9 = lib'.callElixir ../interpreters/elixir/1.9.nix {
inherit erlang;
debugInfo = true;
};
# Remove old versions of elixir, when the supports fades out:
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
elixir_ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; };
lfe = lfe_1_3;
lfe_1_3 = lib'.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
# Non hex packages. Examples how to build Rebar/Mix packages with and
# without helper functions buildRebar3 and buildMix.
hex = callPackage ./hex { };
webdriver = callPackage ./webdriver { };
};
in
makeExtensible packages

View file

@ -0,0 +1,75 @@
{ lib, elixir, fetchFromGitHub, fetchMixDeps, mixRelease }:
# Based on the work of Hauleth
# None of this would have happened without him
let
pname = "elixir-ls";
pinData = lib.importJSON ./pin.json;
version = pinData.version;
src = fetchFromGitHub {
owner = "elixir-lsp";
repo = "elixir-ls";
rev = "v${version}";
sha256 = pinData.sha256;
fetchSubmodules = true;
};
in
mixRelease {
inherit pname version src elixir;
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version elixir;
sha256 = pinData.depsSha256;
};
# elixir_ls is an umbrella app
# override configurePhase to not skip umbrella children
configurePhase = ''
runHook preConfigure
mix deps.compile --no-deps-check
runHook postConfigure
'';
# elixir_ls require a special step for release
# compile and release need to be performed together because
# of the no-deps-check requirement
buildPhase = ''
runHook preBuild
mix do compile --no-deps-check, elixir_ls.release
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -Rv release $out/lib
# Prepare the wrapper script
substitute release/language_server.sh $out/bin/elixir-ls \
--replace 'exec "''${dir}/launch.sh"' "exec $out/lib/launch.sh"
chmod +x $out/bin/elixir-ls
# prepare the launcher
substituteInPlace $out/lib/launch.sh \
--replace "ERL_LIBS=\"\$SCRIPTPATH:\$ERL_LIBS\"" \
"ERL_LIBS=$out/lib:\$ERL_LIBS" \
--replace "exec elixir" "exec ${elixir}/bin/elixir"
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/elixir-lsp/elixir-ls";
description = ''
A frontend-independent IDE "smartness" server for Elixir.
Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
'';
longDescription = ''
The Elixir Language Server provides a server that runs in the background, providing IDEs, editors, and other tools with information about Elixir Mix projects.
It adheres to the Language Server Protocol, a standard for frontend-independent IDE support.
Debugger integration is accomplished through the similar VS Code Debug Protocol.
'';
license = licenses.asl20;
platforms = platforms.unix;
maintainers = teams.beam.members;
};
passthru.updateScript = ./update.sh;
}

View file

@ -0,0 +1,5 @@
{
"version": "0.9.0",
"sha256": "sha256-dHHmA9TAM5YEfbUoujgy1XLzdh7zGWhR9SsFoTnKX48=",
"depsSha256": "sha256-YkZ/tp537ULKfXka4IdD+RgLlXuv6ayxdYn9KFyXrr4="
}

View file

@ -0,0 +1,31 @@
#!/usr/bin/env nix-shell
#! nix-shell -i oil -p jq sd nix-prefetch-github ripgrep
# TODO set to `verbose` or `extdebug` once implemented in oil
set -x
const directory = $(dirname $0 | xargs realpath)
const owner = "elixir-lsp"
const repo = "elixir-ls"
const latest_rev = $(curl -q https://api.github.com/repos/${owner}/${repo}/releases/latest | \
jq -r '.tag_name')
const latest_version = $(echo $latest_rev | sd 'v' '')
const current_version = $(jq -r '.version' $directory/pin.json)
if ("$latest_version" === "$current_version") {
echo "elixir-ls is already up-to-date"
return 0
} else {
const tarball_meta = $(nix-prefetch-github $owner $repo --rev "$latest_rev")
const tarball_hash = "sha256-$(echo $tarball_meta | jq -r '.sha256')"
const sha256s = $(rg '"sha256-.+"' $directory/default.nix | sd '.+"(.+)";' '$1' )
jq ".version = \"$latest_version\" | \
.\"sha256\" = \"$tarball_hash\" | \
.\"depsSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
const new_mix_hash = $(nix-build -A elixir_ls.mixFodDeps 2>&1 | \
tail -n 1 | \
sd '\s+got:\s+' '')
jq ".depsSha256 = \"$new_mix_hash\"" $directory/pin.json | sponge $directory/pin.json
}

View file

@ -0,0 +1,47 @@
{ fetchFromGitHub, fetchgit, fetchHex, rebar3WithPlugins, rebar3-nix, rebar3Relx
, buildRebar3, writeScript, lib }:
let
owner = "inaka";
repo = "elvis";
in rebar3Relx rec {
releaseType = "escript";
# The package name "elvis" is already taken
pname = "elvis-erlang";
version = "1.1.0";
src = fetchFromGitHub {
inherit owner repo;
sha256 = "6vNxr3AYpFuXaIVH9bWw7K5KiF1swfI+CSI43RoMQEA=";
rev = version;
};
beamDeps = builtins.attrValues (import ./rebar-deps.nix {
inherit fetchHex fetchgit fetchFromGitHub;
builder = buildRebar3;
});
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash common-updater-scripts git nix-prefetch-git gnutar gzip "rebar3WithPlugins {globalPlugins = [beamPackages.rebar3-nix];}"
set -euo pipefail
latest=$(list-git-tags | sort -V | tail -1)
if [ "$latest" != "${version}" ]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/beam-modules/elvis-erlang"
update-source-version elvis-erlang "$latest" --version-key=version --print-changes --file="$nix_path/default.nix"
tmpdir=$(mktemp -d)
cp -R $(nix-build $nixpkgs --no-out-link -A elvis-erlang.src)/* "$tmpdir"
(cd "$tmpdir" && HOME=. rebar3 nix lock -o "$nix_path/rebar-deps.nix")
else
echo "${repo} is already up-to-date"
fi
'';
meta = with lib; {
homepage = "https://github.com/inaka/elvis";
description = "Erlang Style Reviewer";
platforms = platforms.unix;
license = licenses.asl20;
maintainers = with lib.maintainers; [ dlesl ];
mainProgram = "elvis";
};
}

View file

@ -0,0 +1,168 @@
# Generated by rebar3_nix
let fetchOnly = { src, ... }: src;
in { builder ? fetchOnly, fetchHex, fetchgit, fetchFromGitHub, overrides ? (x: y: { }) }:
let
self = packages // (overrides self packages);
packages = with self; {
unicode_util_compat = builder {
name = "unicode_util_compat";
version = "0.7.0";
src = fetchHex {
pkg = "unicode_util_compat";
version = "0.7.0";
sha256 = "sha256-Je7m1n32GWDPanlCOVZlmbCeF+Zo03ACR7xJhjgVJSE=";
};
beamDeps = [ ];
};
ssl_verify_fun = builder {
name = "ssl_verify_fun";
version = "1.1.6";
src = fetchHex {
pkg = "ssl_verify_fun";
version = "1.1.6";
sha256 = "sha256-vbDSRx9FPIj/OQjnaG+G+b4yfQZcwewW+kVAGX6gRoA=";
};
beamDeps = [ ];
};
parse_trans = builder {
name = "parse_trans";
version = "3.4.1";
src = fetchHex {
pkg = "parse_trans";
version = "3.4.1";
sha256 = "sha256-YgpAbOddragnuC5FPBnPBndr4mb1pnz/NOHvLLtg5Jo=";
};
beamDeps = [ ];
};
mimerl = builder {
name = "mimerl";
version = "1.2.0";
src = fetchHex {
pkg = "mimerl";
version = "1.2.0";
sha256 = "sha256-8nhYVlCqWBmGJkY46/aY+LsZ3yl/Zq2RsYkQ38bhkyM=";
};
beamDeps = [ ];
};
metrics = builder {
name = "metrics";
version = "1.0.1";
src = fetchHex {
pkg = "metrics";
version = "1.0.1";
sha256 = "sha256-abCa3dxPdKQHFq5U0UD5O+sPuJeNhjbq3tDDG28JnxY=";
};
beamDeps = [ ];
};
idna = builder {
name = "idna";
version = "6.1.1";
src = fetchHex {
pkg = "idna";
version = "6.1.1";
sha256 = "sha256-kjdut4lEEu0ZrEdeSob3tBPBufu1vRbczVeTQVeUTOo=";
};
beamDeps = [ unicode_util_compat ];
};
certifi = builder {
name = "certifi";
version = "2.8.0";
src = fetchHex {
pkg = "certifi";
version = "2.8.0";
sha256 = "sha256-asfvwcb4YAsI1iUpLUu/WE4UhHzhtrXETZg9Jz4Ql+o=";
};
beamDeps = [ ];
};
zipper = builder {
name = "zipper";
version = "1.0.1";
src = fetchHex {
pkg = "zipper";
version = "1.0.1";
sha256 = "sha256-ah/T4fDMHR31ZCyaDOIXgDZBGwpclkKFHR2idr1zfC0=";
};
beamDeps = [ ];
};
lager = builder {
name = "lager";
version = "3.9.1";
src = fetchHex {
pkg = "lager";
version = "3.9.1";
sha256 = "sha256-P1m6daBKmeXxi/kcifRtzlNvg8bLQV/ibm51pivvN9w=";
};
beamDeps = [ goldrush ];
};
katana_code = builder {
name = "katana_code";
version = "1.1.2";
src = fetchHex {
pkg = "katana_code";
version = "1.1.2";
sha256 = "sha256-5+YWKkToJqA/aLUDt9kpgbiUv4NMHvDmR3g/fWaIAhw=";
};
beamDeps = [ ];
};
jsx = builder {
name = "jsx";
version = "2.10.0";
src = fetchHex {
pkg = "jsx";
version = "2.10.0";
sha256 = "sha256-moPjcEgHKYAWlo21Bvn60PAn3jdUbrg4s64QZMOgrWI=";
};
beamDeps = [ ];
};
hackney = builder {
name = "hackney";
version = "1.17.1";
src = fetchHex {
pkg = "hackney";
version = "1.17.1";
sha256 = "sha256-0sup48gQOtAyBiPp8cM+jTeKFeqr4u6K5EGJjz01oYw=";
};
beamDeps = [ certifi idna metrics mimerl parse_trans ssl_verify_fun unicode_util_compat ];
};
goldrush = builder {
name = "goldrush";
version = "0.1.9";
src = fetchHex {
pkg = "goldrush";
version = "0.1.9";
sha256 = "sha256-mctBKM/8syJ1geXU2APVQT+mQ/TrllI/d9nmk32ZTOs=";
};
beamDeps = [ ];
};
getopt = builder {
name = "getopt";
version = "1.0.2";
src = fetchHex {
pkg = "getopt";
version = "1.0.2";
sha256 = "sha256-oAKa6kMi+4KmH2h2ptnGbcmHi2y2H6oT3zGHOE/U6iY=";
};
beamDeps = [ ];
};
elvis_core = builder {
name = "elvis_core";
version = "1.3.1";
src = fetchHex {
pkg = "elvis_core";
version = "1.3.1";
sha256 = "sha256-eoiQv4GFoyUs1OvYJv5fita5MCTt+IV26yeunl3BnWk=";
};
beamDeps = [ katana_code zipper ];
};
egithub = builder {
name = "egithub";
version = "0.7.0";
src = fetchHex {
pkg = "egithub";
version = "0.7.0";
sha256 = "sha256-4AnOEe/YAI0PntWdnEiOPpq+MCoPLNbWY+TMJnVvzEw=";
};
beamDeps = [ goldrush hackney jsx lager ];
};
};
in self

View file

@ -0,0 +1,67 @@
{ fetchFromGitHub, fetchgit, fetchHex, rebar3Relx, buildRebar3, rebar3-proper
, stdenv, writeScript, lib }:
let
version = "0.35.0";
owner = "erlang-ls";
repo = "erlang_ls";
deps = import ./rebar-deps.nix {
inherit fetchHex fetchFromGitHub fetchgit;
builder = buildRebar3;
overrides = (self: super: {
proper = super.proper.overrideAttrs (_: {
configurePhase = "true";
});
});
};
in
rebar3Relx {
pname = "erlang-ls";
inherit version;
src = fetchFromGitHub {
inherit owner repo;
sha256 = "sha256-5pGFLatcNqxpQZtu/qgwX88C8TZvk+U8ez2IGf+jgRA=";
rev = version;
};
releaseType = "escript";
beamDeps = builtins.attrValues deps;
buildPlugins = [ rebar3-proper ];
buildPhase = "HOME=. make";
# based on https://github.com/erlang-ls/erlang_ls/blob/main/.github/workflows/build.yml
# these tests are excessively long and we should probably skip them
checkPhase = ''
HOME=. epmd -daemon
HOME=. rebar3 ct
HOME=. rebar3 proper --constraint_tries 100
'';
# tests seem to be a bit flaky on darwin, skip them for now
doCheck = !stdenv.isDarwin;
installPhase = ''
mkdir -p $out/bin
cp _build/default/bin/erlang_ls $out/bin/
cp _build/dap/bin/els_dap $out/bin/
'';
meta = with lib; {
homepage = "https://github.com/erlang-ls/erlang_ls";
description = "The Erlang Language Server";
platforms = platforms.unix;
license = licenses.asl20;
};
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p common-updater-scripts coreutils git gnused gnutar gzip "rebar3WithPlugins { globalPlugins = [ beamPackages.rebar3-nix ]; }"
set -ox errexit
latest=$(list-git-tags | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
if [[ "$latest" != "${version}" ]]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/beam-modules/erlang-ls"
update-source-version erlang-ls "$latest" --version-key=version --print-changes --file="$nix_path/default.nix"
tmpdir=$(mktemp -d)
cp -R $(nix-build $nixpkgs --no-out-link -A erlang-ls.src)/* "$tmpdir"
DEBUG=1
(cd "$tmpdir" && HOME=. rebar3 as test nix lock -o "$nix_path/rebar-deps.nix")
else
echo "erlang-ls is already up-to-date"
fi
'';
}

View file

@ -0,0 +1,221 @@
# Generated by rebar3_nix
let fetchOnly = { src, ... }: src;
in { builder ? fetchOnly, fetchHex, fetchgit, fetchFromGitHub, overrides ? (x: y: { }) }:
let
self = packages // (overrides self packages);
packages = with self; {
getopt = builder {
name = "getopt";
version = "1.0.1";
src = fetchHex {
pkg = "getopt";
version = "1.0.1";
sha256 = "sha256-U+Grg7nOtlyWctPno1uAkum9ybPugHIUcaFhwQxZlZw=";
};
beamDeps = [ ];
};
zipper = builder {
name = "zipper";
version = "1.0.1";
src = fetchHex {
pkg = "zipper";
version = "1.0.1";
sha256 = "sha256-ah/T4fDMHR31ZCyaDOIXgDZBGwpclkKFHR2idr1zfC0=";
};
beamDeps = [ ];
};
quickrand = builder {
name = "quickrand";
version = "2.0.1";
src = fetchHex {
pkg = "quickrand";
version = "2.0.1";
sha256 = "sha256-FNtn1K72uIFYEOyfPM714yS3O1bK42h/mddSuFvdTJY=";
};
beamDeps = [ ];
};
providers = builder {
name = "providers";
version = "1.8.1";
src = fetchHex {
pkg = "providers";
version = "1.8.1";
sha256 = "sha256-5FdFrenEdqmkaeoIQOQYqxk2DcRPAaIzME4RikRIa6A=";
};
beamDeps = [ getopt ];
};
katana_code = builder {
name = "katana_code";
version = "0.2.1";
src = fetchHex {
pkg = "katana_code";
version = "0.2.1";
sha256 = "sha256-hEitP1bZgU+YoovmUPcZG91QZXXjRcwW1YZmCxD26ZI=";
};
beamDeps = [ ];
};
bucs = builder {
name = "bucs";
version = "1.0.16";
src = fetchHex {
pkg = "bucs";
version = "1.0.16";
sha256 = "sha256-/2pccqUArXrsHuO6FkrjxFDq3uiYsNFR4frKGKyNDWI=";
};
beamDeps = [ ];
};
yamerl = builder {
name = "yamerl";
version = "git";
src = fetchFromGitHub {
owner = "erlang-ls";
repo = "yamerl";
rev = "9a9f7a2e84554992f2e8e08a8060bfe97776a5b7";
sha256 = "1gb44v27paxwxm443m5f554wiziqi2kd300hgjjdg6fyvy3mvhss";
};
beamDeps = [ ];
};
uuid = builder {
name = "uuid";
version = "2.0.1";
src = fetchHex {
pkg = "uuid_erl";
version = "2.0.1";
sha256 = "sha256-q1fKzNUfFwAR5fREzoZfhLQWBeSDqe/MRowa+uyHVTs=";
};
beamDeps = [ quickrand ];
};
tdiff = builder {
name = "tdiff";
version = "0.1.2";
src = fetchHex {
pkg = "tdiff";
version = "0.1.2";
sha256 = "sha256-4MLhaPmSUqWIl2jVyPHmUQoYRZLUz6BrIneKGNM9eHU=";
};
beamDeps = [ ];
};
redbug = builder {
name = "redbug";
version = "2.0.6";
src = fetchHex {
pkg = "redbug";
version = "2.0.6";
sha256 = "sha256-qtlJhnH0q5HqylCZ/oWmFhgVimNuYoaJLE989K8XHQQ=";
};
beamDeps = [ ];
};
rebar3_format = builder {
name = "rebar3_format";
version = "0.8.2";
src = fetchHex {
pkg = "rebar3_format";
version = "0.8.2";
sha256 = "sha256-yo/ydjjCFpWT0USdrL6IlWNBk+0zNOkGtU/JfwgfUhM=";
};
beamDeps = [ katana_code ];
};
jsx = builder {
name = "jsx";
version = "3.0.0";
src = fetchHex {
pkg = "jsx";
version = "3.0.0";
sha256 = "sha256-N77KBDX1yoovRfdqRiEedkGPvvgMNvA2HCSfx1BZ3G0=";
};
beamDeps = [ ];
};
gradualizer = builder {
name = "gradualizer";
version = "git";
src = fetchFromGitHub {
owner = "josefs";
repo = "gradualizer";
rev = "6e89b4e1cd489637a848cc5ca55058c8a241bf7d";
sha256 = "1ix0xgd0267ibx6y68fx4pq8q3j0y7rjs7j3cv3v2gdiy190psy9";
};
beamDeps = [ ];
};
erlfmt = builder {
name = "erlfmt";
version = "git";
src = fetchFromGitHub {
owner = "gomoripeti";
repo = "erlfmt";
rev = "d4422d1fd79a73ef534c2bcbe5b5da4da5338833";
sha256 = "07jp4g6a41w7318lh8ndsvgivkj0ahz3spnrsnx4cqkdb97yjaid";
};
beamDeps = [ ];
};
ephemeral = builder {
name = "ephemeral";
version = "2.0.4";
src = fetchHex {
pkg = "ephemeral";
version = "2.0.4";
sha256 = "sha256-Syk9gPdfnEV1/0ucjoiaVoAvQLAYv1fnTxlkTv7myFA=";
};
beamDeps = [ bucs ];
};
elvis_core = builder {
name = "elvis_core";
version = "1.3.1";
src = fetchHex {
pkg = "elvis_core";
version = "1.3.1";
sha256 = "sha256-eoiQv4GFoyUs1OvYJv5fita5MCTt+IV26yeunl3BnWk=";
};
beamDeps = [ katana_code zipper ];
};
docsh = builder {
name = "docsh";
version = "0.7.2";
src = fetchHex {
pkg = "docsh";
version = "0.7.2";
sha256 = "sha256-Tn20YbsHVA0rw9NmuFE/AZdxLQSVu4V0TzZ9OBUHYTQ=";
};
beamDeps = [ providers ];
};
proper_contrib = builder {
name = "proper_contrib";
version = "0.2.0";
src = fetchHex {
pkg = "proper_contrib";
version = "0.2.0";
sha256 = "sha256-jFRRL1zr9JKaG1eqMDfcKk2xe93uOrXUenB14icVCBU=";
};
beamDeps = [ proper ];
};
proper = builder {
name = "proper";
version = "1.3.0";
src = fetchHex {
pkg = "proper";
version = "1.3.0";
sha256 = "sha256-SqGS/M3dA/2+UP72IL6dTS+SY1tU9V+4OuwYWZRAPLw=";
};
beamDeps = [ ];
};
meck = builder {
name = "meck";
version = "0.9.0";
src = fetchHex {
pkg = "meck";
version = "0.9.0";
sha256 = "sha256-+BPpDdC4myUWoCAaNV6EsavHi1dRqgy/ZpqdhagQrGM=";
};
beamDeps = [ ];
};
coveralls = builder {
name = "coveralls";
version = "2.2.0";
src = fetchHex {
pkg = "coveralls";
version = "2.2.0";
sha256 = "sha256-zVTbCqjGS1OSgBicVhns7hOkaiiw8ct3RUTdzBZiBKM=";
};
beamDeps = [ jsx ];
};
};
in self

View file

@ -0,0 +1,20 @@
{ fetchFromGitHub, rebar3Relx, lib }:
rebar3Relx rec {
pname = "erlfmt";
version = "1.0.0";
releaseType = "escript";
src = fetchFromGitHub {
owner = "WhatsApp";
repo = "erlfmt";
sha256 = "19apbs9xr4j8qjb3sv9ilknqjw4a7bvp8jvwrjiwvwnxzzm2kjm6";
rev = "v${version}";
};
meta = with lib; {
homepage = "https://github.com/WhatsApp/erlfmt";
description = "An automated code formatter for Erlang";
platforms = platforms.unix;
license = licenses.asl20;
maintainers = with lib.maintainers; [ dlesl ];
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl }:
{ pkg
, version
, sha256
, meta ? { }
}:
with lib;
stdenv.mkDerivation ({
pname = "hex-source-${pkg}";
inherit version;
dontBuild = true;
dontConfigure = true;
dontFixup = true;
src = fetchurl {
url = "https://repo.hex.pm/tarballs/${pkg}-${version}.tar";
inherit sha256;
};
unpackCmd = ''
tar -xf $curSrc contents.tar.gz
mkdir contents
tar -C contents -xzf contents.tar.gz
'';
installPhase = ''
runHook preInstall
mkdir "$out"
cp -Hrt "$out" .
success=1
runHook postInstall
'';
inherit meta;
})

View file

@ -0,0 +1,60 @@
{ stdenvNoCC, lib, elixir, hex, rebar, rebar3, cacert, git }@inputs:
{ pname
, version
, sha256
, src
, mixEnv ? "prod"
, debug ? false
, meta ? { }
, patches ? []
, elixir ? inputs.elixir
, hex ? inputs.hex.override { inherit elixir; }
, ...
}@attrs:
stdenvNoCC.mkDerivation (attrs // {
nativeBuildInputs = [ elixir hex cacert git ];
MIX_ENV = mixEnv;
MIX_DEBUG = if debug then 1 else 0;
DEBUG = if debug then 1 else 0; # for rebar3
# the api with `mix local.rebar rebar path` makes a copy of the binary
MIX_REBAR = "${rebar}/bin/rebar";
MIX_REBAR3 = "${rebar3}/bin/rebar3";
# there is a persistent download failure with absinthe 1.6.3
# those defaults reduce the failure rate
HEX_HTTP_CONCURRENCY = 1;
HEX_HTTP_TIMEOUT = 120;
configurePhase = attrs.configurePhase or ''
runHook preConfigure
export HEX_HOME="$TEMPDIR/.hex";
export MIX_HOME="$TEMPDIR/.mix";
export MIX_DEPS_PATH="$TEMPDIR/deps";
# Rebar
export REBAR_GLOBAL_CONFIG_DIR="$TMPDIR/rebar3"
export REBAR_CACHE_DIR="$TMPDIR/rebar3.cache"
runHook postConfigure
'';
inherit patches;
dontBuild = true;
installPhase = attrs.installPhase or ''
runHook preInstall
mix deps.get --only ${mixEnv}
find "$TEMPDIR/deps" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +
cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out
runHook postInstall
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
inherit meta;
})

View file

@ -0,0 +1,42 @@
{ lib, stdenv, rebar3 }:
{ name
, version
, sha256
, src
, meta ? { }
}:
with lib;
stdenv.mkDerivation ({
pname = "rebar-deps-${name}";
inherit version;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;
prePhases = ''
cp ${src} .
HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/_checkouts"
for i in ./_build/default/lib/* ; do
echo "$i"
cp -R "$i" "$out/_checkouts"
done
runHook postInstall
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
inherit meta;
})

View file

@ -0,0 +1,57 @@
{ lib, stdenv, fetchFromGitHub, writeText, elixir }:
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
pkg = self: stdenv.mkDerivation rec {
pname = "hex";
version = "1.0.1";
src = fetchFromGitHub {
owner = "hexpm";
repo = "hex";
rev = "v${version}";
sha256 = "sha256-5g2MDbStlUrAPQCv1xWp+oPyRIOqARmlsKo/ONLTLnY=";
};
setupHook = writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
'';
dontStrip = true;
buildInputs = [ elixir ];
buildPhase = ''
runHook preBuild
export HEX_OFFLINE=1
export HEX_HOME=./
export MIX_ENV=prod
mix compile
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/erlang/lib
cp -r ./_build/prod/lib/hex $out/lib/erlang/lib/
runHook postInstall
'';
meta = {
description = "Package manager for the Erlang VM https://hex.pm";
license = lib.licenses.mit;
homepage = "https://github.com/hexpm/hex";
maintainers = with lib.maintainers; [ ericbmerritt ];
};
passthru = {
env = shell self;
};
};
in lib.fix pkg

View file

@ -0,0 +1,79 @@
{ pkgs, lib }:
rec {
/* Similar to callPackageWith/callPackage, but without makeOverridable
*/
callPackageWith = autoArgs: fn: args:
let
f = if pkgs.lib.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs;
in f (auto // args);
callPackage = callPackageWith pkgs;
/* Uses generic-builder to evaluate provided drv containing OTP-version
specific data.
drv: package containing version-specific args;
builder: generic builder for all Erlang versions;
args: arguments merged into version-specific args, used mostly to customize
dependencies;
Arguments passed to the generic-builder are overridable, used to
enable/disable high-level OTP features, like ODBC or WX support;
Please note that "mkDerivation" defined here is the one called from R16.nix
and similar files.
*/
callErlang = drv: args:
let
builder = callPackage ../../development/interpreters/erlang/generic-builder.nix args;
in
callPackage drv {
mkDerivation = pkgs.makeOverridable builder;
};
/* Uses generic-builder to evaluate provided drv containing Elixir version
specific data.
drv: package containing version-specific args;
builder: generic builder for all Erlang versions;
args: arguments merged into version-specific args, used mostly to customize
dependencies;
Arguments passed to the generic-builder are overridable.
Please note that "mkDerivation" defined here is the one called from 1.4.nix
and similar files.
*/
callElixir = drv: args:
let
builder = callPackage ../interpreters/elixir/generic-builder.nix args;
in
callPackage drv {
mkDerivation = pkgs.makeOverridable builder;
};
/* Uses generic-builder to evaluate provided drv containing Elixir version
specific data.
drv: package containing version-specific args;
builder: generic builder for all Erlang versions;
args: arguments merged into version-specific args, used mostly to customize
dependencies;
Arguments passed to the generic-builder are overridable.
Please note that "mkDerivation" defined here is the one called from 1.2.nix
and similar files.
*/
callLFE = drv: args:
let
builder = callPackage ../interpreters/lfe/generic-builder.nix args;
in
callPackage drv {
mkDerivation = pkgs.makeOverridable builder;
};
}

View file

@ -0,0 +1,18 @@
# shellcheck shell=bash
# this hook will symlink all dependencies found in ERL_LIBS
# since Elixir 1.12.2 elixir does not look into ERL_LIBS for
# elixir depencencies anymore, so those have to be symlinked to the _build directory
mkdir -p _build/"$MIX_ENV"/lib
while read -r -d ':' lib; do
for dir in "$lib"/*; do
# Strip version number for directory name if it exists, so naming of
# all libs matches what mix's expectation.
dest=$(basename "$dir" | cut -d '-' -f1)
build_dir="_build/$MIX_ENV/lib/$dest"
((MIX_DEBUG == 1)) && echo "Linking $dir to $build_dir"
# Symlink libs to _build so that mix can find them when compiling.
# This is what allows mix to compile the package without searching
# for dependencies over the network.
ln -s "$dir" "$build_dir"
done
done <<< "$ERL_LIBS:"

View file

@ -0,0 +1,125 @@
{ stdenv, lib, elixir, erlang, findutils, hex, rebar, rebar3, fetchMixDeps, makeWrapper, git, ripgrep }@inputs:
{ pname
, version
, src
, nativeBuildInputs ? [ ]
, buildInputs ? [ ]
, meta ? { }
, enableDebugInfo ? false
, mixEnv ? "prod"
, compileFlags ? [ ]
# mix fixed output derivation dependencies
, mixFodDeps ? null
# mix dependencies generated by mix2nix
# this assumes each dependency is built by buildMix or buildRebar3
# each dependency needs to have a setup hook to add the lib path to $ERL_LIBS
# this is how mix will find dependencies
, mixNixDeps ? { }
, elixir ? inputs.elixir
, hex ? inputs.hex.override { inherit elixir; }
, ...
}@attrs:
let
# remove non standard attributes that cannot be coerced to strings
overridable = builtins.removeAttrs attrs [ "compileFlags" "mixNixDeps" ];
in
assert mixNixDeps != { } -> mixFodDeps == null;
stdenv.mkDerivation (overridable // {
# rg is used as a better grep to search for erlang references in the final release
nativeBuildInputs = nativeBuildInputs ++ [ erlang hex elixir makeWrapper git ripgrep ];
buildInputs = buildInputs ++ builtins.attrValues mixNixDeps;
MIX_ENV = mixEnv;
MIX_DEBUG = if enableDebugInfo then 1 else 0;
HEX_OFFLINE = 1;
DEBUG = if enableDebugInfo then 1 else 0; # for Rebar3 compilation
# the api with `mix local.rebar rebar path` makes a copy of the binary
# some older dependencies still use rebar
MIX_REBAR = "${rebar}/bin/rebar";
MIX_REBAR3 = "${rebar3}/bin/rebar3";
postUnpack = ''
export HEX_HOME="$TEMPDIR/hex"
export MIX_HOME="$TEMPDIR/mix"
# Rebar
export REBAR_GLOBAL_CONFIG_DIR="$TEMPDIR/rebar3"
export REBAR_CACHE_DIR="$TEMPDIR/rebar3.cache"
${lib.optionalString (mixFodDeps != null) ''
# compilation of the dependencies will require
# that the dependency path is writable
# thus a copy to the TEMPDIR is inevitable here
export MIX_DEPS_PATH="$TEMPDIR/deps"
cp --no-preserve=mode -R "${mixFodDeps}" "$MIX_DEPS_PATH"
''
}
'' + (attrs.postUnpack or "");
configurePhase = attrs.configurePhase or ''
runHook preConfigure
${./mix-configure-hook.sh}
# this is needed for projects that have a specific compile step
# the dependency needs to be compiled in order for the task
# to be available
# Phoenix projects for example will need compile.phoenix
mix deps.compile --no-deps-check --skip-umbrella-children
runHook postConfigure
'';
buildPhase = attrs.buildPhase or ''
runHook preBuild
mix compile --no-deps-check ${lib.concatStringsSep " " compileFlags}
runHook postBuild
'';
installPhase = attrs.installPhase or ''
runHook preInstall
mix release --no-deps-check --path "$out"
runHook postInstall
'';
# Stripping of the binary is intentional
# even though it does not affect beam files
# it is necessary for NIFs binaries
postFixup = ''
if [ -e "$out/bin/${pname}.bat" ]; then # absent in special cases, i.e. elixir-ls
rm "$out/bin/${pname}.bat" # windows file
fi
# contains secrets and should not be in the nix store
# TODO document how to handle RELEASE_COOKIE
# secrets should not be in the nix store.
# This is only used for connecting multiple nodes
if [ -e $out/releases/COOKIE ]; then # absent in special cases, i.e. elixir-ls
rm $out/releases/COOKIE
fi
# removing unused erlang reference from resulting derivation to reduce
# closure size
if [ -e $out/erts-* ]; then
echo "ERTS found in $out - removing references to erlang to reduce closure size"
# there is a link in $out/erts-*/bin/start always
# TODO:
# sometimes there are links in dependencies like bcrypt compiled binaries
# at the moment those are not removed since substituteInPlace will
# error on binaries
for file in $(rg "${erlang}/lib/erlang" "$out" --files-with-matches); do
echo "removing reference to erlang in $file"
substituteInPlace "$file" --replace "${erlang}/lib/erlang" "$out"
done
fi
'';
# TODO investigate why the resulting closure still has
# a reference to erlang.
# uncommenting the following will fail the build
# disallowedReferences = [ erlang ];
})

View file

@ -0,0 +1,13 @@
{ lib, buildHex }:
buildHex {
name = "pc";
version = "1.12.0";
sha256 = "1gdvixy4j560qjdiv5qjgnl5wl3rrn231dv1m4vdq4b9l4g4p27x";
meta = {
description = "a rebar3 port compiler for native code";
license = lib.licenses.mit;
homepage = "https://github.com/blt/port_compiler";
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchFromGitHub, buildRebar3 }:
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
pkg = self: buildRebar3 {
name = "pgsql";
version = "25+beta.2";
src = fetchFromGitHub {
owner = "semiocast";
repo = "pgsql";
rev = "14f632bc89e464d82ce3ef12a67ed8c2adb5b60c";
sha256 = "17dcahiwlw61zhy8aq9rn46lwb35fb9q3372s4wmz01czm8c348w";
};
dontStrip = true;
meta = {
description = "Erlang PostgreSQL Driver";
license = lib.licenses.mit;
homepage = "https://github.com/semiocast/pgsql";
maintainers = with lib.maintainers; [ ericbmerritt ];
};
passthru = {
env = shell self;
};
};
in lib.fix pkg

View file

@ -0,0 +1,18 @@
{ lib, buildRebar3, fetchFromGitHub }:
buildRebar3 rec {
name = "rebar3_nix";
version = "0.1.1";
src = fetchFromGitHub {
owner = "erlang-nix";
repo = name;
rev = "v${version}";
sha256 = "10ijc06qvv5hqv0qy3w7mbv9pshdb8bvy0f3phr1vd5hksbk731y";
};
meta = {
description = "nix integration for rebar3";
license = lib.licenses.bsd3;
homepage = "https://github.com/erlang-nix/rebar3_nix";
maintainers = with lib.maintainers; [ dlesl gleber ];
};
}

View file

@ -0,0 +1,13 @@
{ lib, buildHex }:
buildHex {
name = "rebar3_proper";
version = "0.12.1";
sha256 = "1f174fb6h2071wr7qbw9aqqvnglzsjlylmyi8215fhrmi38w94b6";
meta = {
description = "rebar3 proper plugin";
license = lib.licenses.bsd3;
homepage = "https://github.com/ferd/rebar3_proper";
};
}

View file

@ -0,0 +1,108 @@
{ stdenv
, erlang
, rebar3WithPlugins
, openssl
, lib
}:
{ pname
, version
, src
, beamDeps ? [ ]
, buildPlugins ? [ ]
, checkouts ? null
, releaseType
, buildInputs ? [ ]
, setupHook ? null
, profile ? "default"
, installPhase ? null
, buildPhase ? null
, configurePhase ? null
, meta ? { }
, ...
}@attrs:
with lib;
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.pname}";
buildInputs = [ drv ];
};
customPhases = filterAttrs
(_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; };
# When using the `beamDeps` argument, it is important that we use
# `rebar3WithPlugins` here even when there are no plugins. The vanilla
# `rebar3` package is an escript archive with bundled dependencies which can
# interfere with those in the app we are trying to build. `rebar3WithPlugins`
# doesn't have this issue since it puts its own deps last on the code path.
rebar3 = rebar3WithPlugins {
plugins = buildPlugins;
};
pkg =
assert beamDeps != [ ] -> checkouts == null;
self: stdenv.mkDerivation (attrs // {
name = "${pname}-${version}";
inherit version pname;
buildInputs = buildInputs ++ [ erlang rebar3 openssl ] ++ beamDeps;
# ensure we strip any native binaries (eg. NIFs, ports)
stripDebugList = lib.optional (releaseType == "release") "rel";
inherit src;
REBAR_IGNORE_DEPS = beamDeps != [ ];
configurePhase = ''
runHook preConfigure
${lib.optionalString (checkouts != null)
"cp --no-preserve=all -R ${checkouts}/_checkouts ."}
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
HOME=. DEBUG=1 rebar3 as ${profile} ${if releaseType == "escript"
then "escriptize"
else "release"}
runHook postBuild
'';
installPhase = ''
runHook preInstall
dir=${if releaseType == "escript"
then "bin"
else "rel"}
mkdir -p "$out/$dir" "$out/bin"
cp -R --preserve=mode "_build/${profile}/$dir" "$out"
${lib.optionalString (releaseType == "release")
"find $out/rel/*/bin -type f -executable -exec ln -s -t $out/bin {} \\;"}
runHook postInstall
'';
postInstall = ''
for dir in $out/rel/*/erts-*; do
echo "ERTS found in $dir - removing references to erlang to reduce closure size"
for f in $dir/bin/{erl,start}; do
substituteInPlace "$f" --replace "${erlang}/lib/erlang" "''${dir/\/erts-*/}"
done
done
'';
meta = {
inherit (erlang.meta) platforms;
} // meta;
passthru = ({
packageName = pname;
env = shell self;
} // (if attrs ? passthru then attrs.passthru else { }));
} // customPhases);
in
fix pkg

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchFromGitHub, writeText, erlang }:
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
};
pkg = self: stdenv.mkDerivation {
pname = "webdriver";
version = "0.pre+unstable=2015-02-08";
src = fetchFromGitHub {
owner = "Quviq";
repo = "webdrv";
rev = "7ceaf1f67d834e841ca0133b4bf899a9fa2db6bb";
sha256 = "1pq6pmlr6xb4hv2fvmlrvzd8c70kdcidlgjv4p8n9pwvkif0cb87";
};
setupHook = writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
'';
buildInputs = [ erlang ];
installFlags = [ "PREFIX=$(out)/lib/erlang/lib" ];
meta = {
description = "WebDriver implementation in Erlang";
license = lib.licenses.mit;
homepage = "https://github.com/Quviq/webdrv";
maintainers = with lib.maintainers; [ ericbmerritt ];
};
passthru = {
env = shell self;
};
};
in lib.fix pkg

View file

@ -0,0 +1,49 @@
{ pkgs }:
{ buildInputs ? [], generated, ... } @ attrs:
let
# Fetches the bower packages. `generated` should be the result of a
# `bower2nix` command.
bowerPackages = import generated {
inherit (pkgs) buildEnv fetchbower;
};
in pkgs.stdenv.mkDerivation (
attrs
//
{
name = "bower_components-" + attrs.name;
inherit bowerPackages;
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup
# The project's bower.json is required
cp $src/bower.json .
# Dereference symlinks -- bower doesn't like them
cp --recursive --reflink=auto \
--dereference --no-preserve=mode \
$bowerPackages bc
# Bower install in offline mode -- links together the fetched
# bower packages.
HOME=$PWD bower \
--config.storage.packages=bc/packages \
--config.storage.registry=bc/registry \
--offline install
# Sets up a single bower_components directory within
# the output derivation.
mkdir -p $out
mv bower_components $out
'';
buildInputs = buildInputs ++ [
pkgs.git
pkgs.nodePackages.bower
];
}
)

View file

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, chez }:
stdenv.mkDerivation rec {
pname = "chez-matchable";
version = "20160306";
src = fetchFromGitHub {
owner = "fedeinthemix";
repo = "chez-matchable";
rev = "v${version}";
sha256 = "02qn7x348p23z1x5lwhkyj7i8z6mgwpzpnwr8dyina0yzsdkr71s";
};
buildInputs = [ chez ];
buildPhase = ''
make PREFIX=$out CHEZ=${chez}/bin/scheme
'';
installPhase = ''
make install PREFIX=$out CHEZ=${chez}/bin/scheme
'';
doCheck = false;
meta = with lib; {
description = "This is a Library for ChezScheme providing the portable hygenic pattern matcher by Alex Shinn";
homepage = "https://github.com/fedeinthemix/chez-matchable/";
maintainers = [ maintainers.jitwit ];
license = licenses.publicDomain;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, chez, chez-srfi }:
stdenv.mkDerivation rec {
pname = "chez-mit";
version = "0.1";
src = fetchFromGitHub {
owner = "fedeinthemix";
repo = "chez-mit";
rev = "v${version}";
sha256 = "sha256-YM4/Sj8otuWJCrUBsglVnihxRGI32F6tSbODFM0a8TA=";
};
buildInputs = [ chez chez-srfi ];
buildPhase = ''
make PREFIX=$out CHEZ=${chez}/bin/scheme
'';
installPhase = ''
make install PREFIX=$out CHEZ=${chez}/bin/scheme
'';
doCheck = false;
meta = with lib; {
description = "This is a MIT/GNU Scheme compatibility library for Chez Scheme";
homepage = "https://github.com/fedeinthemix/chez-mit/";
maintainers = [ maintainers.jitwit ];
license = licenses.free;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, chez, chez-srfi, chez-mit }:
stdenv.mkDerivation rec {
pname = "chez-scmutils";
version = "0.1";
src = fetchFromGitHub {
owner = "fedeinthemix";
repo = "chez-scmutils";
rev = "v${version}";
sha256 = "sha256-9GBoHbLNEnPz81s2rBYO3S0bXldetwc8eu9i5CgvYFE=";
};
buildInputs = [ chez chez-srfi chez-mit ];
buildPhase = ''
make PREFIX=$out CHEZ=${chez}/bin/scheme
'';
installPhase = ''
make install PREFIX=$out CHEZ=${chez}/bin/scheme
'';
doCheck = false;
meta = with lib; {
description = "This is a port of the MIT Scmutils library to Chez Scheme";
homepage = "https://github.com/fedeinthemix/chez-scmutils/";
maintainers = [ maintainers.jitwit ];
license = licenses.gpl3;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, chez }:
stdenv.mkDerivation {
pname = "chez-srfi";
version = "1.0";
src = fetchFromGitHub {
owner = "fedeinthemix";
repo = "chez-srfi";
rev = "5770486c2a85d0e3dd4ac62a97918e7c394ea507";
sha256 = "sha256-8icdkbYmpTpossirFoulUhJY/8Jo+2eeaMwDftbZh+g=";
};
buildInputs = [ chez ];
buildPhase = ''
make PREFIX=$out CHEZ=${chez}/bin/scheme
'';
installPhase = ''
make install PREFIX=$out CHEZ=${chez}/bin/scheme
'';
doCheck = false;
meta = with lib; {
description = "This package provides a collection of SRFI libraries for Chez Scheme";
homepage = "https://github.com/fedeinthemix/chez-srfi/";
maintainers = [ maintainers.jitwit ];
license = licenses.free;
};
}

View file

@ -0,0 +1,12 @@
diff -Naur 4th-3.64.0-old/sources/Makefile 4th-3.64.0-new/sources/Makefile
--- 4th-3.64.0-old/sources/Makefile 2022-03-15 12:37:45.925122854 -0300
+++ 4th-3.64.0-new/sources/Makefile 2022-03-15 12:38:50.987870211 -0300
@@ -125,7 +125,7 @@
install: mostlyinstall
install -Dm644 ../documentation/4th.1 $(MANDIR)/man1/4th.1
- install -Dm644 ../documentation/4tHmanual.txt $(DOCDIR)/4th/
+ install -Dm644 ../documentation/4tHmanual.pdf $(DOCDIR)/4th/
uninstall:
-rm -f $(LIBRARIES)/lib4th.{a,so*}

View file

@ -0,0 +1,46 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "4th";
version = "3.64.0";
src = fetchurl {
url = "https://sourceforge.net/projects/forth-4th/files/${pname}-${version}/${pname}-${version}-unix.tar.gz";
hash = "sha256-wJBekjFsFRIkhY/P/yHBQ8he+k+fGyrePGTP2Yjgpqg=";
};
patches = [
# Fix install manual; report this patch to upstream
./001-install-manual-fixup.diff
];
dontConfigure = true;
makeFlags = [
"-C sources"
"CC=${stdenv.cc.targetPrefix}cc"
];
preInstall = ''
install -d ${placeholder "out"}/bin \
${placeholder "out"}/lib \
${placeholder "out"}/share/doc/${pname} \
${placeholder "out"}/share/man
'';
installFlags = [
"BINARIES=${placeholder "out"}/bin"
"LIBRARIES=${placeholder "out"}/lib"
"DOCDIR=${placeholder "out"}/share/doc"
"MANDIR=${placeholder "out"}/share/man"
];
meta = with lib; {
homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
description = "A portable Forth compiler";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO: set Makefile according to platform

View file

@ -0,0 +1,43 @@
{lib, stdenv, fetchurl, ant, jre, jdk}:
stdenv.mkDerivation rec {
pname = "abcl";
version = "1.9.0";
# or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
src = fetchurl {
url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz";
sha256 = "sha256-oStchPKINL2Yjjra4K0q1MxsRR2eRPPAhT0AcVjBmGk=";
};
configurePhase = ''
mkdir nix-tools
export PATH="$PWD/nix-tools:$PATH"
echo "echo nix-builder.localdomain" > nix-tools/hostname
chmod a+x nix-tools/*
hostname
'';
buildPhase = ''
ant
'';
# Fix for https://github.com/armedbear/abcl/issues/484
javaOpts =
lib.optionalString
(lib.versionAtLeast jre.version "17")
"--add-opens=java.base/java.util.jar=ALL-UNNAMED";
installPhase = ''
mkdir -p "$out"/{bin,share/doc/abcl,lib/abcl}
cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/"
cp -r dist/*.jar contrib/ "$out/lib/abcl/"
echo "#! ${stdenv.shell}" >> "$out/bin/abcl"
echo "${jre}/bin/java $javaOpts -cp \"$out/lib/abcl/abcl.jar:$out/lib/abcl/abcl-contrib.jar:\$CLASSPATH\" org.armedbear.lisp.Main \"\$@\"" >> "$out/bin/abcl"
chmod a+x "$out"/bin/*
'';
buildInputs = [jre ant jdk jre];
meta = {
description = "A JVM-based Common Lisp implementation";
license = lib.licenses.gpl3 ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
homepage = "https://common-lisp.net/project/armedbear/";
};
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchsvn }:
stdenv.mkDerivation rec {
pname = "acme";
version = "unstable-2021-02-14";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/acme-crossass/code-0/trunk";
rev = "319";
sha256 = "sha256-VifIQ+UEVMKJ+cNS+Xxusazinr5Cgu1lmGuhqj/5Mpk=";
};
sourceRoot = "code-0-r${src.rev}/src";
makeFlags = [ "BINDIR=$(out)/bin" ];
postPatch = ''
substituteInPlace Makefile \
--replace "= gcc" "?= gcc"
'';
meta = with lib; {
description = "A multi-platform cross assembler for 6502/6510/65816 CPUs";
homepage = "https://sourceforge.net/projects/acme-crossass/";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = with maintainers; [ OPNA2608 ];
};
}

View file

@ -0,0 +1,67 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i python3 -p "python3.withPackages (ps: with ps; [ requests ])"
import json
import re
import requests
import sys
releases = ("openjdk8", "openjdk11", "openjdk13", "openjdk14", "openjdk15", "openjdk16")
oses = ("mac", "linux")
types = ("jre", "jdk")
impls = ("hotspot", "openj9")
arch_to_nixos = {
"x64": ("x86_64",),
"aarch64": ("aarch64",),
"arm": ("armv6l", "armv7l"),
"ppc64le": ("powerpc64le",),
}
def get_sha256(url):
resp = requests.get(url)
if resp.status_code != 200:
print("error: could not fetch checksum from url {}: code {}".format(url, resp.code), file=sys.stderr)
sys.exit(1)
return resp.text.strip().split(" ")[0]
def generate_sources(release, assets):
out = {}
for asset in assets:
if asset["os"] not in oses: continue
if asset["binary_type"] not in types: continue
if asset["openjdk_impl"] not in impls: continue
if asset["heap_size"] != "normal": continue
if asset["architecture"] not in arch_to_nixos: continue
# examples: 11.0.1+13, 8.0.222+10
version, build = asset["version_data"]["semver"].split("+")
type_map = out.setdefault(asset["os"], {})
impl_map = type_map.setdefault(asset["binary_type"], {})
arch_map = impl_map.setdefault(asset["openjdk_impl"], {
"packageType": asset["binary_type"],
"vmType": asset["openjdk_impl"],
})
for nixos_arch in arch_to_nixos[asset["architecture"]]:
arch_map[nixos_arch] = {
"url": asset["binary_link"],
"sha256": get_sha256(asset["checksum_link"]),
"version": version,
"build": build,
}
return out
out = {}
for release in releases:
resp = requests.get("https://api.adoptopenjdk.net/v2/latestAssets/releases/" + release)
if resp.status_code != 200:
print("error: could not fetch data for release {} (code {})".format(release, resp.code), file=sys.stderr)
sys.exit(1)
out[release] = generate_sources(release, resp.json())
with open("sources.json", "w") as f:
json.dump(out, f, indent=2, sort_keys=True)
f.write('\n')

View file

@ -0,0 +1,66 @@
{ sourcePerArch, knownVulnerabilities ? [] }:
{ swingSupport ? true # not used for now
, lib, stdenv
, fetchurl
, setJavaClassPath
}:
assert (stdenv.isDarwin && stdenv.isx86_64);
let cpuName = stdenv.hostPlatform.parsed.cpu.name;
result = stdenv.mkDerivation {
pname = if sourcePerArch.packageType == "jdk"
then "adoptopenjdk-${sourcePerArch.vmType}-bin"
else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin";
version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
src = fetchurl {
inherit (sourcePerArch.${cpuName}) url sha256;
};
# See: https://github.com/NixOS/patchelf/issues/10
dontStrip = 1;
installPhase = ''
cd ..
mv $sourceRoot $out
# jni.h expects jni_md.h to be in the header search path.
ln -s $out/Contents/Home/include/darwin/*_md.h $out/Contents/Home/include/
rm -rf $out/Home/demo
# Remove some broken manpages.
rm -rf $out/Home/man/ja*
ln -s $out/Contents/Home/* $out/
# Propagate the setJavaClassPath setup hook from the JDK so that
# any package that depends on the JDK has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
EOF
'';
# FIXME: use multiple outputs or return actual JRE package
passthru.jre = result;
passthru.home = result;
meta = with lib; {
license = licenses.gpl2Classpath;
description = "AdoptOpenJDK, prebuilt OpenJDK binary";
platforms = [ "x86_64-darwin" ]; # some inherit jre.meta.platforms
maintainers = with lib.maintainers; [ taku0 ];
inherit knownVulnerabilities;
mainProgram = "java";
};
}; in result

View file

@ -0,0 +1,122 @@
{ sourcePerArch, knownVulnerabilities ? [] }:
{ stdenv
, lib
, fetchurl
, autoPatchelfHook
, makeWrapper
, setJavaClassPath
# minimum dependencies
, alsa-lib
, fontconfig
, freetype
, libffi
, xorg
, zlib
# runtime dependencies
, cups
# runtime dependencies for GTK+ Look and Feel
, gtkSupport ? true
, cairo
, glib
, gtk3
}:
let
cpuName = stdenv.hostPlatform.parsed.cpu.name;
runtimeDependencies = [
cups
] ++ lib.optionals gtkSupport [
cairo glib gtk3
];
runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
in
let result = stdenv.mkDerivation rec {
pname = if sourcePerArch.packageType == "jdk"
then "adoptopenjdk-${sourcePerArch.vmType}-bin"
else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin";
version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
src = fetchurl {
inherit (sourcePerArch.${cpuName}) url sha256;
};
buildInputs = [
alsa-lib # libasound.so wanted by lib/libjsound.so
fontconfig
freetype
stdenv.cc.cc.lib # libstdc++.so.6
xorg.libX11
xorg.libXext
xorg.libXi
xorg.libXrender
xorg.libXtst
zlib
] ++ lib.optional stdenv.isAarch32 libffi;
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
# See: https://github.com/NixOS/patchelf/issues/10
dontStrip = 1;
installPhase = ''
cd ..
mv $sourceRoot $out
# jni.h expects jni_md.h to be in the header search path.
ln -s $out/include/linux/*_md.h $out/include/
rm -rf $out/demo
# Remove some broken manpages.
rm -rf $out/man/ja*
# Remove embedded freetype to avoid problems like
# https://github.com/NixOS/nixpkgs/issues/57733
find "$out" -name 'libfreetype.so*' -delete
# Propagate the setJavaClassPath setup hook from the JDK so that
# any package that depends on the JDK has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> "$out/nix-support/setup-hook"
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
EOF
# We cannot use -exec since wrapProgram is a function but not a command.
#
# jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it
# breaks building OpenJDK (#114495).
for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
if patchelf --print-interpreter "$bin" &> /dev/null; then
wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
fi
done
'';
preFixup = ''
find "$out" -name libfontmanager.so -exec \
patchelf --add-needed libfontconfig.so {} \;
'';
# FIXME: use multiple outputs or return actual JRE package
passthru.jre = result;
passthru.home = result;
meta = with lib; {
license = licenses.gpl2Classpath;
description = "AdoptOpenJDK, prebuilt OpenJDK binary";
platforms = lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
maintainers = with lib.maintainers; [ taku0 ];
inherit knownVulnerabilities;
mainProgram = "java";
};
}; in result

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jdk.hotspot; };
jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jre.hotspot; };
jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jdk.openj9; };
jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.linux.jdk.hotspot; };
jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.linux.jre.hotspot; };
jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.linux.jdk.openj9; };
jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.linux.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jre.openj9; knownVulnerabilities = ["Support ended"]; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.linux.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.linux.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.linux.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.linux.jre.openj9; knownVulnerabilities = ["Support ended"]; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jre.openj9; knownVulnerabilities = ["Support ended"]; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.linux.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.linux.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.linux.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.linux.jre.openj9; knownVulnerabilities = ["Support ended"]; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jdk.hotspot; };
jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jre.hotspot; };
jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jdk.openj9; };
jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.linux.jdk.hotspot; };
jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.linux.jre.hotspot; };
jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.linux.jdk.openj9; };
jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.linux.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jdk.hotspot; };
jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jre.hotspot; };
jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jdk.openj9; };
jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.linux.jdk.hotspot; };
jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.linux.jre.hotspot; };
jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.linux.jdk.openj9; };
jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.linux.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jdk.hotspot; };
jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jre.hotspot; };
jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jdk.openj9; };
jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jre.openj9; };
}

View file

@ -0,0 +1,11 @@
{ lib }:
let
sources = lib.importJSON ./sources.json;
in
{
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.linux.jdk.hotspot; };
jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.linux.jre.hotspot; };
jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.linux.jdk.openj9; };
jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.linux.jre.openj9; };
}

View file

@ -0,0 +1,962 @@
{
"openjdk11": {
"linux": {
"jdk": {
"hotspot": {
"aarch64": {
"build": "101",
"sha256": "79572f5172c6a040591d34632f98a20ed148702bbce2f57649e8ac01c0d2e3db",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"armv6l": {
"build": "101",
"sha256": "f4d53a1753cdde830d7872c6a1279df441f3f9aeb5d5037a568b3a392ebce9c2",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_arm_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"armv7l": {
"build": "101",
"sha256": "f4d53a1753cdde830d7872c6a1279df441f3f9aeb5d5037a568b3a392ebce9c2",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_arm_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"packageType": "jdk",
"powerpc64le": {
"build": "101",
"sha256": "9750e11721282a9afd18a07743f19c699b2b71ce20d02f3f0a906088b9ae6d9a",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"vmType": "hotspot",
"x86_64": {
"build": "101",
"sha256": "43fb84f8063ad9bf6b6d694a67b8f64c8827552b920ec5ce794dfe5602edffe7",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
}
},
"openj9": {
"aarch64": {
"build": "9",
"sha256": "31242e10bb826679aae3ed303be17ad3ef3c2551afbbd19f031ada87dd73258f",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_aarch64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11-ea"
},
"packageType": "jdk",
"powerpc64le": {
"build": "9",
"sha256": "691f2b252b5be5e36079177d56ff7b516e3058277f0ba852a16a9a0cd9668224",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_ppc64le_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11"
},
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "a605ab06f76533d44ce0828bd96836cc9c0e71ec3df3f8672052ea98dcbcca22",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "101",
"sha256": "6426ce7dfdacaa798ec7779e0bec30ec8510df491fb2c965e8e6bf2f88af27e9",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"armv6l": {
"build": "101",
"sha256": "964a5d3c1f63209e5ad908a302220b3ba2e81a6574b7b7a5020f736e1496835f",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jre_arm_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"armv7l": {
"build": "101",
"sha256": "964a5d3c1f63209e5ad908a302220b3ba2e81a6574b7b7a5020f736e1496835f",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jre_arm_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"packageType": "jre",
"powerpc64le": {
"build": "101",
"sha256": "8c9efc13680f43b742a54ecb3be614efd62749d401e780143fef3ac5403a6284",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jre_ppc64le_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
},
"vmType": "hotspot",
"x86_64": {
"build": "101",
"sha256": "b5a6960bc6bb0b1a967e307f908ea9b06ad7adbbd9df0b8954ab51374faa8a98",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jre_x64_linux_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
}
},
"openj9": {
"aarch64": {
"build": "9",
"sha256": "434219d233bdb8f1bee024b1ca5accfc3f1f832320b5221ded715eed101e705f",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_aarch64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11-ea"
},
"packageType": "jre",
"powerpc64le": {
"build": "9",
"sha256": "f11ae15da7f2809caeeca70a7cf3b9e7f943848869f498f1b73efc10ef7170f0",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_ppc64le_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11"
},
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "152bf992d965ed018e9e1c3c2eb2c1771f92e0b6485b9a1f2c6d84d282117715",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_x64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11"
}
}
}
},
"mac": {
"jdk": {
"hotspot": {
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "101",
"sha256": "8c69808f5d9d209b195575e979de0e43cdf5d0f1acec1853a569601fe2c1f743",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "797cee6b9f6e18bcc026ee9dcebbce81d62ca897038402d247630b25d41efe15",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11"
}
}
},
"jre": {
"hotspot": {
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "101",
"sha256": "1b2f792ad05af9dba876db962c189527e645b48f50ceb842b4e39169de553303",
"url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jre_x64_mac_hotspot_11.0.14.1_1.tar.gz",
"version": "11.0.14"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "80a0c03f0b603d6008e29c651f884878743fcaa90fc05aef15f3411749da94e7",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_x64_mac_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
"version": "11.0.11"
}
}
}
}
},
"openjdk13": {
"linux": {
"jdk": {
"hotspot": {
"aarch64": {
"build": "8.1",
"sha256": "0e6081cb51f8a6f3062bef4f4c45dbe1fccfd3f3b4b5d52522a3edb76581e3af",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_aarch64_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
},
"armv6l": {
"build": "8.1",
"sha256": "9beec080f2b2a7f6883b024272f4e8d5a0b027325e83647be318215781af1d1a",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_arm_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
},
"armv7l": {
"build": "8.1",
"sha256": "9beec080f2b2a7f6883b024272f4e8d5a0b027325e83647be318215781af1d1a",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_arm_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
},
"packageType": "jdk",
"powerpc64le": {
"build": "8.1",
"sha256": "fb3362e34aac091a4682394d20dcdc3daea51995d369d62c28424573e0fc04aa",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_ppc64le_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "8.1",
"sha256": "9ccc063569f19899fd08e41466f8c4cd4e05058abdb5178fa374cb365dcf5998",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
}
},
"openj9": {
"packageType": "jdk",
"powerpc64le": {
"build": "8.1",
"sha256": "f71513e525172dfef695b7c27b25e151f232e05b2281648c2b794650c4970832",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_ppc64le_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"version": "13.0.2"
},
"vmType": "openj9",
"x86_64": {
"build": "8.1",
"sha256": "aeecf6d30d0c847db81d07793cf97e5dc44890c29366d7d9f8f9f397f6c52590",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_x64_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"version": "13.0.2"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "8.1",
"sha256": "6c4b69d1609f4c65c576c80d6aa101de80048f8ce5566f890e8fff5349228bae",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_aarch64_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
},
"packageType": "jre",
"powerpc64le": {
"build": "8.1",
"sha256": "43d6fb71bdf7b6ad9295087c46dfc9b00bf26db1b5cdcff0c418cbe43b49904a",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_ppc64le_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "8.1",
"sha256": "897f16fe8e056395209e35d2384013bd1ff250e717465769079e3f4793628c34",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_x64_linux_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
}
},
"openj9": {
"packageType": "jre",
"powerpc64le": {
"build": "8.1",
"sha256": "7bf8dc4c3b95e87b154f7bc2f9388a6539413fe76d49b362bba878217ccb7ed7",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jre_ppc64le_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"version": "13.0.2"
},
"vmType": "openj9",
"x86_64": {
"build": "8.1",
"sha256": "a0ab38607811e282f64082edc68a2dea3fa6a5113391efb124a6d7d02883110a",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jre_x64_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"version": "13.0.2"
}
}
}
},
"mac": {
"jdk": {
"hotspot": {
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "8.1",
"sha256": "0ddb24efdf5aab541898d19b7667b149a1a64a8bd039b708fc58ee0284fa7e07",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "8.1",
"sha256": "dd8d92eec98a3455ec5cd065a0a6672cc1aef280c6a68c507c372ccc1d98fbaa",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_x64_mac_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"version": "13.0.2"
}
}
},
"jre": {
"hotspot": {
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "8.1",
"sha256": "3149b9ebf0db1eaf2dc152df9efae82003e7971efb1cf550060e6a4798fe8c5c",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_x64_mac_hotspot_13.0.2_8.tar.gz",
"version": "13.0.2"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "8.1",
"sha256": "6a8a636fca4c7e368241e232a37cd73c9867cdec8f0869fd158b1f58c6128cc2",
"url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jre_x64_mac_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"version": "13.0.2"
}
}
}
}
},
"openjdk14": {
"linux": {
"jdk": {
"hotspot": {
"aarch64": {
"build": "12",
"sha256": "ee87e9f03b1fbe6f328429b78fe1a9f44900026d220c90dfd747fe0bcd62d904",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_aarch64_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"armv6l": {
"build": "12",
"sha256": "65f193496c6977ba7aed1563edc4b5be091b5ff03e3d790074bb4e389a034b36",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_arm_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"armv7l": {
"build": "12",
"sha256": "65f193496c6977ba7aed1563edc4b5be091b5ff03e3d790074bb4e389a034b36",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_arm_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"packageType": "jdk",
"powerpc64le": {
"build": "12",
"sha256": "465a3b8e931896b8d95e452d479615c4bf543535c05b6ea246323ae114e67d7d",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_ppc64le_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "12",
"sha256": "7d5ee7e06909b8a99c0d029f512f67b092597aa5b0e78c109bd59405bbfa74fe",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
}
},
"openj9": {
"packageType": "jdk",
"powerpc64le": {
"build": "12",
"sha256": "177fd161ae14df92203d70cd618559daf889ec0c172d6ee615859352f68a2371",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_ppc64le_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"version": "14.0.2"
},
"vmType": "openj9",
"x86_64": {
"build": "12",
"sha256": "306f7138cdb65daaf2596ec36cafbde72088144c83b2e964f0193662e6caf3be",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"version": "14.0.2"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "12",
"sha256": "2b749ceead19d68dd7e3c28b143dc4f94bb0916378a98b7346e851318ea4da84",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_aarch64_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"armv6l": {
"build": "12",
"sha256": "4468ecf74956783ae41a46e8ba023c003c69e4d111622944aad1af764a1bc4af",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_arm_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"armv7l": {
"build": "12",
"sha256": "4468ecf74956783ae41a46e8ba023c003c69e4d111622944aad1af764a1bc4af",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_arm_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"packageType": "jre",
"powerpc64le": {
"build": "12",
"sha256": "0f96998be562cfbe8a4114581349dbd2609d0a23091e538fe142dcd9c83e70cf",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_ppc64le_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "12",
"sha256": "1107845947da56e6bdad0da0b79210a079a74ec5c806f815ec5db9d09e1a9236",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_x64_linux_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
}
},
"openj9": {
"packageType": "jre",
"powerpc64le": {
"build": "12",
"sha256": "ad7a55a3669878c0c7d7c66faafe7c626d4341374719b6fdd81d2986c6e80945",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jre_ppc64le_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"version": "14.0.2"
},
"vmType": "openj9",
"x86_64": {
"build": "12",
"sha256": "3a137146a7b0bd8b029e72beb37c5fbb09dcfb9e33a10125076fff1555227cfd",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jre_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"version": "14.0.2"
}
}
}
},
"mac": {
"jdk": {
"hotspot": {
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "12",
"sha256": "09b7e6ab5d5eb4b73813f4caa793a0b616d33794a17988fa6a6b7c972e8f3dd3",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "12",
"sha256": "95e6abcc12dde676ccd5ba65ab86f06ddaa22749dde00e31f4c6d3ea95277359",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_x64_mac_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"version": "14.0.2"
}
}
},
"jre": {
"hotspot": {
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "12",
"sha256": "e8b5196de8ecb2b136a28494c2888784b9d9e22e29d2c38528892fb7d0c95260",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_x64_mac_hotspot_14.0.2_12.tar.gz",
"version": "14.0.2"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "12",
"sha256": "2562a442d7278409358f474071db34df4ba9c555925f28d0270139f97133c8d5",
"url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jre_x64_mac_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"version": "14.0.2"
}
}
}
}
},
"openjdk15": {
"linux": {
"jdk": {
"hotspot": {
"aarch64": {
"build": "7",
"sha256": "6e8b6b037148cf20a284b5b257ec7bfdf9cc31ccc87778d0dfd95a2fddf228d4",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_aarch64_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"armv6l": {
"build": "7",
"sha256": "ff39c0380224e419d940382c4d651cb1e6297a794854e0cc459c1fd4973b3368",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_arm_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"armv7l": {
"build": "7",
"sha256": "ff39c0380224e419d940382c4d651cb1e6297a794854e0cc459c1fd4973b3368",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_arm_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"packageType": "jdk",
"powerpc64le": {
"build": "7",
"sha256": "486f2aad94c5580c0b27c9007beebadfccd4677c0bd9565a77ca5c34af5319f9",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_ppc64le_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "7",
"sha256": "94f20ca8ea97773571492e622563883b8869438a015d02df6028180dd9acc24d",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
}
},
"openj9": {
"aarch64": {
"build": "7",
"sha256": "b69a4bc87ed2e985d252cff02d53f1a11b8d83d39e0800cd4a1cab4521375314",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_aarch64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2-ea"
},
"packageType": "jdk",
"powerpc64le": {
"build": "7",
"sha256": "5b2158268de0be247801b7823ee3e7f739254d77718a1879848627181feee2f4",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_ppc64le_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2"
},
"vmType": "openj9",
"x86_64": {
"build": "7",
"sha256": "5515ccd79b1b5e8d8a615b80d5fe1272f7bb41100e46d94fb78ee611ea014816",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_x64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "7",
"sha256": "1c1fc968d76004b0be0042027712835dcbe3570a6fc3a208157a4ab6adabbef2",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_aarch64_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"armv6l": {
"build": "7",
"sha256": "304be224952dbea7000cda6223b2978b3eefdf2e3749032c3b381a213c8d9c5e",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_arm_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"armv7l": {
"build": "7",
"sha256": "304be224952dbea7000cda6223b2978b3eefdf2e3749032c3b381a213c8d9c5e",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_arm_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"packageType": "jre",
"powerpc64le": {
"build": "7",
"sha256": "dc2480948ac3e6b192fb77c9d37227510f44482e52a330002d6e7497a62a7d67",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_ppc64le_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "7",
"sha256": "31af7efdb1cc0ffd001bc145c3d255266889ad6b502133283ae8bf233d11334c",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_x64_linux_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
}
},
"openj9": {
"aarch64": {
"build": "7",
"sha256": "37492012e75d75021dfb2b25fe5cc73664c03fee85532cec30ce4f5a4e5389c6",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_aarch64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2-ea"
},
"packageType": "jre",
"powerpc64le": {
"build": "7",
"sha256": "79f657141f1cd0e4a70d041b9215b8b00140d479ce73ed71bc4f3dd015157958",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_ppc64le_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2"
},
"vmType": "openj9",
"x86_64": {
"build": "7",
"sha256": "a4ae1b7275fcfd6d87a3387edacc8e353dc95ee44f00ca5a348ea90331ec2084",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_x64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2"
}
}
}
},
"mac": {
"jdk": {
"hotspot": {
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "7",
"sha256": "d358a7ff03905282348c6c80562a4da2e04eb377b60ad2152be4c90f8d580b7f",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "7",
"sha256": "1336ae5529af3a0e35ae569e4188944831aeed7080a482f2490fc619380cbe53",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_x64_mac_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2"
}
}
},
"jre": {
"hotspot": {
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "7",
"sha256": "6a7150fa3ca8277394ff5bae6f56a70f61d2144a5dbbea4f008d86a3e5498795",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_x64_mac_hotspot_15.0.2_7.tar.gz",
"version": "15.0.2"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "7",
"sha256": "2c0ba5e66764d660037343db4bf32f1ed75ad27661e54e9a4df23d40cae448b0",
"url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_x64_mac_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"version": "15.0.2"
}
}
}
}
},
"openjdk16": {
"linux": {
"jdk": {
"hotspot": {
"aarch64": {
"build": "7",
"sha256": "cb77d9d126f97898dfdc8b5fb694d1e0e5d93d13a0a6cb2aeda76f8635384340",
"url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_aarch64_linux_hotspot_16.0.2_7.tar.gz",
"version": "16.0.2"
},
"armv6l": {
"build": "7",
"sha256": "7721ef81416af8122a28448f3d661eb4bda40a9f78d400e4ecc55b58e627a00c",
"url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_arm_linux_hotspot_16.0.2_7.tar.gz",
"version": "16.0.2"
},
"armv7l": {
"build": "7",
"sha256": "7721ef81416af8122a28448f3d661eb4bda40a9f78d400e4ecc55b58e627a00c",
"url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_arm_linux_hotspot_16.0.2_7.tar.gz",
"version": "16.0.2"
},
"packageType": "jdk",
"powerpc64le": {
"build": "7",
"sha256": "36ebe6c72f2fc19b8b17371f731390e15fa3aab08c28b55b9a8b71d0a578adc9",
"url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_ppc64le_linux_hotspot_16.0.2_7.tar.gz",
"version": "16.0.2"
},
"vmType": "hotspot",
"x86_64": {
"build": "7",
"sha256": "323d6d7474a359a28eff7ddd0df8e65bd61554a8ed12ef42fd9365349e573c2c",
"url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz",
"version": "16.0.2"
}
},
"openj9": {
"aarch64": {
"build": "9",
"sha256": "abc56cd266b4acc96cc700b166ad016907dac97d7a593bd5c369d54efc4b4acd",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_aarch64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1-ea"
},
"packageType": "jdk",
"powerpc64le": {
"build": "9",
"sha256": "9200acc9ddb6b0d4facf3ea44b17d3a10035316a379b4b148382b25cacf2bb83",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_ppc64le_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1"
},
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "7395aaa479a7410bbe5bd5efc43d2669718c61ba146b06657315dbd467b98bf1",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_x64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "9",
"sha256": "4e47f1cbf46190727be74cd73445ec2b693f5ba4a74542c554d6b3285811cab5",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_aarch64_linux_hotspot_16.0.1_9.tar.gz",
"version": "16.0.1"
},
"armv6l": {
"build": "9",
"sha256": "c1f88f3ce955cb2e9a4236a916cc6660ef55231d29c4390b1a4398ebbca358b7",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_arm_linux_hotspot_16.0.1_9.tar.gz",
"version": "16.0.1"
},
"armv7l": {
"build": "9",
"sha256": "c1f88f3ce955cb2e9a4236a916cc6660ef55231d29c4390b1a4398ebbca358b7",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_arm_linux_hotspot_16.0.1_9.tar.gz",
"version": "16.0.1"
},
"packageType": "jre",
"powerpc64le": {
"build": "9",
"sha256": "495805e2e9bcabeac0d8271623b6c92604440608286f4ce411ea48f582854930",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_ppc64le_linux_hotspot_16.0.1_9.tar.gz",
"version": "16.0.1"
},
"vmType": "hotspot",
"x86_64": {
"build": "9",
"sha256": "5eca19d406c6d130e9c3a4b932b9cb0a6e9cd45932450668c3e911bded4bcf40",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_linux_hotspot_16.0.1_9.tar.gz",
"version": "16.0.1"
}
},
"openj9": {
"aarch64": {
"build": "9",
"sha256": "01d8337d1069b8bfdcdf096b30cc24d1df42ffeede676da99fed77bef2670454",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_aarch64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1-ea"
},
"packageType": "jre",
"powerpc64le": {
"build": "9",
"sha256": "f9734c100f0e85ac63b9f9327b77135221a905e1d743cd9cd4edc0ea0e0fe8d9",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_ppc64le_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1"
},
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "fab572dd1a2ef00fd18ad4f5a4c373d0cf140045e61f9104cd5b8dbf6b3a517d",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_x64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1"
}
}
}
},
"mac": {
"jdk": {
"hotspot": {
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "7",
"sha256": "27975d9e695cfbb93861540926f9f7bcac973a254ceecbee549706a99cbbdf95",
"url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_mac_hotspot_16.0.2_7.tar.gz",
"version": "16.0.2"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "6d4241c6ede2167fb71bd57f7a770a74564ee007c06bcae98e1abc3c1de4756f",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_x64_mac_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1"
}
}
},
"jre": {
"hotspot": {
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "9",
"sha256": "33eeccbeea75e70b09610ba12e9591386a0e42248525b8358c9ae683bce82779",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_mac_hotspot_16.0.1_9.tar.gz",
"version": "16.0.1"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "f57a6f04cf21a8470bb6f9488c57031d89db73c8b24997d74812855372f4e6b8",
"url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_x64_mac_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
"version": "16.0.1"
}
}
}
}
},
"openjdk8": {
"linux": {
"jdk": {
"hotspot": {
"aarch64": {
"build": "6",
"sha256": "42ed3ff5a859f9015a1362fb7e650026b913d688eab471714f795651120be173",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_aarch64_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"armv6l": {
"build": "6",
"sha256": "0666c466b8aefcc66ab25aea9c0605f5c6eda3b174b1b817a4e4e74da0de0365",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_arm_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"armv7l": {
"build": "6",
"sha256": "0666c466b8aefcc66ab25aea9c0605f5c6eda3b174b1b817a4e4e74da0de0365",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_arm_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"packageType": "jdk",
"powerpc64le": {
"build": "6",
"sha256": "c7cc9c5b237e9e1f1e3296593aba427375823592e4604fadf89a8c234c2574e1",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"vmType": "hotspot",
"x86_64": {
"build": "6",
"sha256": "3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
}
},
"openj9": {
"aarch64": {
"build": "10",
"sha256": "b168245ddc18b85135c15ed6baea5cbcc06192b49af04dcfa698458373efc061",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_aarch64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292-ea"
},
"packageType": "jdk",
"powerpc64le": {
"build": "10",
"sha256": "bc88be757a884b90a2bb91365b7e922c0e7d0fea991cd69d1f74c59b2257a4b5",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_ppc64le_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292"
},
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "06d6c9421778575cf59d50f69b7ac6a7bb237485b3a3c2f89cfb61a056c7b2de",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_x64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "6",
"sha256": "22496d5e677aaccc5a85e90584d0a012c51a08898f0e09e259eabe67ed81da2b",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jre_aarch64_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"armv6l": {
"build": "6",
"sha256": "48181f17b85a13c0e2f260c8f4b39483e61664cf07ea00e6210a666fb5210492",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jre_arm_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"armv7l": {
"build": "6",
"sha256": "48181f17b85a13c0e2f260c8f4b39483e61664cf07ea00e6210a666fb5210492",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jre_arm_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"packageType": "jre",
"powerpc64le": {
"build": "6",
"sha256": "f15b536a97c27d114c0b59c86de07ca80a271d3979ed0aa056318ea329e31e5d",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jre_ppc64le_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
},
"vmType": "hotspot",
"x86_64": {
"build": "6",
"sha256": "9c4607cee01919a21c57a36e8c009a7aca7aefd63010c64d7a3023fe8590ebe1",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jre_x64_linux_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
}
},
"openj9": {
"aarch64": {
"build": "10",
"sha256": "f87f90673e25c3ce9e868e96a6059b22665f12d05e389813f75dfbc95d970393",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_aarch64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292-ea"
},
"packageType": "jre",
"powerpc64le": {
"build": "10",
"sha256": "b75216f7905cff08432a9200a78a2694a4074279f79d859d27f82a998ca1b1e9",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_ppc64le_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292"
},
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "6d5b67979e0935febe893895b622647bf8a59df6093ae57074db11d2ac9373ea",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_x64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292"
}
}
}
},
"mac": {
"jdk": {
"hotspot": {
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "6",
"sha256": "96a3124bf0f5ca777954239893cc89ea34c4bc9a9b7c1559aa2c69baa0ee84e3",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_mac_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "d262bc226895e80b7e80d61905e65fe043ca0a3e3b930f7b88ddfacb8835e939",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_x64_mac_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292"
}
}
},
"jre": {
"hotspot": {
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "6",
"sha256": "42d4ada88e39b0f222ffdcf3c833f442af22852687992997eca82c573e65b86f",
"url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jre_x64_mac_hotspot_8u322b06.tar.gz",
"version": "8.0.322"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "50cbc5ef48d0167d649d3ba2c2b8d71553541bffb98914418f4a26e0c5f69aca",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_x64_mac_openj9_8u292b10_openj9-0.26.0.tar.gz",
"version": "8.0.292"
}
}
}
}
}
}

View file

@ -0,0 +1,63 @@
{ lib, stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, xulrunner, zip, pkg-config, npapi_sdk, bash, bc }:
stdenv.mkDerivation rec {
pname = "adoptopenjdk-icedtea-web";
version = "1.8.8";
src = fetchFromGitHub {
owner = "AdoptOpenJDK";
repo = "IcedTea-Web";
rev = "icedtea-web-${version}";
sha256 = "sha256-hpEVWG9ltNDL/0EFJjgQRRce+BLcCO4ZERULYZxyC1o=";
};
nativeBuildInputs = [ autoreconfHook pkg-config 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";
platforms = lib.platforms.linux;
};
}

View file

@ -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

View file

@ -0,0 +1,35 @@
{ stdenv, lib, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "alan2";
version = "2.8.7";
src = fetchFromGitHub {
owner = "alan-if";
repo = "alan";
rev = "71f23ec79f7f5d66aa5ae9fd3f9b8dae41a89f15";
sha256 = "066jknqz1v6sismvfxjfffl35h14v8qwgcq99ibhp08dy2fwraln";
};
makefile = "Makefile.unix";
# Add a workarounf for -fno-common tollchains like upstream gcc-10.
# alan-3 is already fixed, but the backport is nontrivial.
NIX_CFLAGS_COMPILE = "-fcommon";
installPhase = ''
mkdir -p $out/bin $out/share/alan2
cp compiler/alan $out/bin/alan2
cp interpreter/arun $out/bin/arun2
cp alan.readme ChangeLog $out/share/alan2
'';
meta = with lib; {
homepage = "https://www.alanif.se/";
description = "The Alan interactive fiction language (legacy version)";
license = licenses.artistic2;
platforms = platforms.linux;
maintainers = with maintainers; [ neilmayhew ];
};
}

View file

@ -0,0 +1,48 @@
{ stdenv, lib, fetchFromGitHub
, cgreen, openjdk, pkg-config, which
}:
stdenv.mkDerivation rec {
pname = "alan";
version = "3.0beta8";
src = fetchFromGitHub {
owner = "alan-if";
repo = "alan";
rev = "v${version}";
sha256 = "0zfg1frmb4yl39hk8h733bmlwk4rkikzfhvv7j34cxpdpsp7spzl";
};
postPatch = ''
patchShebangs --build bin
# The Makefiles have complex CFLAGS that don't allow separate control of optimization
sed -i 's/-O0/-O2/g' compiler/Makefile.common
sed -i 's/-Og/-O2/g' interpreter/Makefile.common
'';
installPhase = ''
mkdir -p $out/bin $out/share/alan/examples
# Build the release tarball
make package
# The release tarball isn't split up into subdirectories
tar -xf alan*.tgz --strip-components=1 -C $out/share/alan
mv $out/share/alan/*.alan $out/share/alan/examples
chmod a-x $out/share/alan/examples/*.alan
mv $out/share/alan/{alan,arun} $out/bin
# a2a3 isn't included in the release tarball
cp bin/a2a3 $out/bin
'';
nativeBuildInputs = [
cgreen
openjdk pkg-config which
];
meta = with lib; {
homepage = "https://www.alanif.se/";
description = "The Alan interactive fiction language";
license = licenses.artistic2;
platforms = platforms.linux;
maintainers = with maintainers; [ neilmayhew ];
};
}

View file

@ -0,0 +1,27 @@
diff -Naur algol68g-2.8.4-old/source/plotutils.c algol68g-2.8.4-new/source/plotutils.c
--- algol68g-2.8.4-old/source/plotutils.c 2016-10-11 18:14:48.000000000 -0300
+++ algol68g-2.8.4-new/source/plotutils.c 2021-07-30 02:42:29.762627511 -0300
@@ -1026,10 +1026,10 @@
X_COORD (&DEVICE (f)) = 0;
Y_COORD (&DEVICE (f)) = 0;
return (PLOTTER (&DEVICE (f)));
- } else if (!strcmp (device_type, "gif")) {
-/*------------------------------------+
-| Supported plotter type - pseudo GIF |
-+------------------------------------*/
+ } else if (!strcmp (device_type, "gif") || !strcmp (device_type, "png")) {
+/*-------------------------------------------+
+| Supported plotter type - pseudo GIF or PNG |
++-------------------------------------------*/
char *z = DEREF (char, &A68_PAGE_SIZE (&DEVICE (f))), size[BUFFER_SIZE];
/* Establish page size */
if (!scan_int (&z, &(WINDOW_X_SIZE (&DEVICE (f))))) {
@@ -1067,7 +1067,7 @@
(void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "BITMAPSIZE", size);
(void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "BG_COLOR", (void *) "black");
(void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "GIF_ANIMATION", (void *) "no");
- PLOTTER (&DEVICE (f)) = pl_newpl_r ("gif", NULL, STREAM (&DEVICE (f)), stderr, PLOTTER_PARAMS (&DEVICE (f)));
+ PLOTTER (&DEVICE (f)) = pl_newpl_r (device_type, NULL, STREAM (&DEVICE (f)), stderr, PLOTTER_PARAMS (&DEVICE (f)));
if (PLOTTER (&DEVICE (f)) == NULL) {
diagnostic_node (A68_RUNTIME_ERROR, p, ERROR_DEVICE_CANNOT_OPEN);
exit_genie (p, A68_RUNTIME_ERROR);

View file

@ -0,0 +1,56 @@
{ lib
, stdenv
, fetchurl
, gsl
, plotutils
, postgresql
}:
stdenv.mkDerivation rec {
pname = "algol68g";
version = "2.8.4";
src = fetchurl {
url = "https://jmvdveer.home.xs4all.nl/${pname}-${version}.tar.gz";
hash = "sha256-WCPM0MGP4Qo2ihF8w5JHSMSl0P6N/w2dgY/3PDQlZfA=";
};
patches = [
# add PNG support
./0001-plotutils-png-support.diff
];
buildInputs = [
gsl
plotutils
postgresql
];
postInstall = let
pdfdoc = fetchurl {
url = "https://jmvdveer.home.xs4all.nl/learning-algol-68-genie.pdf";
hash = "sha256-QCwn1e/lVfTYTeolCFErvfMhvwCgsBnASqq2K+NYmlU=";
};
in
''
install -m644 ${pdfdoc} $out/share/doc/${pname}/learning-algol-68-genie.pdf
'';
meta = with lib; {
homepage = "https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html";
description = "Algol 68 Genie compiler-interpreter";
longDescription = ''
Algol 68 Genie (a68g) is a recent checkout hybrid compiler-interpreter,
written from scratch by Marcel van der Veer. It ranks among the most
complete Algol 68 implementations. It implements for example arbitrary
precision arithmetic, complex numbers, parallel processing, partial
parametrisation and formatted transput, as well as support for curses,
regular expressions and sounds. It can be linked to GNU plotutils, the GNU
scientific library and PostgreSQL.
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
mainProgram = "a68g";
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,56 @@
{ lib, stdenv, fetchurl, makeWrapper, jre }:
let
playerglobal_ver = "27.0";
playerglobal = fetchurl {
url = "https://fpdownload.macromedia.com/get/flashplayer/updaters/27/playerglobal27_0.swc";
sha256 = "0qw2bgls8qsmp80j8vpd4c7s0c8anlrk0ac8z42w89bajcdbwk2f";
};
in stdenv.mkDerivation rec {
pname = "apache-flex-sdk";
version = "4.16.1";
src = fetchurl {
url = "mirror://apache/flex/${version}/binaries/${pname}-${version}-bin.tar.gz";
sha256 = "13iq16dqvgcpb0p35x66hzxsq5pkbr2lbwr766nnqiryinnagz8p";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
dontBuild = true;
postPatch = ''
shopt -s extglob
for i in bin/!(aasdoc|acompc|amxmlc); do
substituteInPlace $i --replace "java " "${jre}/bin/java "
done
'';
installPhase = ''
t=$out/opt/apache-flex-sdk
mkdir -p $t $out/bin
mv * $t
rm $t/bin/*.bat
ln -s $t/bin/* $out/bin/
for i in $out/bin/!(aasdoc|acompc|amxmlc); do
wrapProgram $i \
--set FLEX_HOME $t \
--set PLAYERGLOBAL_HOME $t/frameworks/libs/player/
done
mkdir -p $t/frameworks/libs/player/${playerglobal_ver}/
cp ${playerglobal} $t/frameworks/libs/player/${playerglobal_ver}/playerglobal.swc
'';
dontFixup = true;
meta = with lib; {
description = "Flex SDK for Adobe Flash / ActionScript";
homepage = "https://flex.apache.org/";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ dywedir ];
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchFromGitHub, icestorm }:
stdenv.mkDerivation rec {
pname = "arachne-pnr";
version = "2019.07.29";
src = fetchFromGitHub {
owner = "yosyshq";
repo = "arachne-pnr";
rev = "c40fb2289952f4f120cc10a5a4c82a6fb88442dc";
sha256 = "0lg9rccr486cvips3jf289af2b4a2j9chc8iqnkhykgi1hw4pszc";
};
enableParallelBuilding = true;
makeFlags = [
"PREFIX=$(out)"
"ICEBOX=${icestorm}/share/icebox"
];
postPatch = ''
substituteInPlace ./Makefile \
--replace 'echo UNKNOWN' 'echo ${lib.substring 0 10 src.rev}'
'';
meta = with lib; {
description = "Place and route tool for FPGAs";
longDescription = ''
Arachne-pnr implements the place and route step of
the hardware compilation process for FPGAs. It
accepts as input a technology-mapped netlist in BLIF
format, as output by the Yosys [0] synthesis suite
for example. It currently targets the Lattice
Semiconductor iCE40 family of FPGAs [1]. Its output
is a textual bitstream representation for assembly by
the IceStorm [2] icepack command.
'';
homepage = "https://github.com/cseed/arachne-pnr";
license = licenses.mit;
maintainers = with maintainers; [ shell thoughtpolice ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,31 @@
{ stdenv, lib, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "armips";
version = "0.11.0";
src = fetchFromGitHub {
owner = "Kingcom";
repo = "armips";
rev = "v${version}";
sha256 = "sha256-L+Uxww/WtvDJn1xZqoqA6Pkzq/98sy1qTxZbv6eEjbA=";
};
nativeBuildInputs = [ cmake ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp armips $out/bin
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/Kingcom/armips";
description = "Assembler for various ARM and MIPS platforms.";
license = licenses.mit;
maintainers = with maintainers; [ marius851000 ];
};
}

View file

@ -0,0 +1,24 @@
diff --git old/as31/run.c new/as31/run.c
index 28c5317..9e5263b 100644
--- old/as31/run.c
+++ new/as31/run.c
@@ -113,7 +113,8 @@ int run_as31(const char *infile, int lst, int use_stdout,
}
while (!feof(finPre)) {
- getline(&lineBuffer,&sizeBuf,finPre);
+ if (getline(&lineBuffer,&sizeBuf,finPre) == -1)
+ break;
if ((includePtr=strstr(lineBuffer,INC_CMD))) {
includePtr=includePtr+strlen(INC_CMD);
while ((*includePtr==' ')|| //move includePtr to filename
@@ -138,7 +139,8 @@ int run_as31(const char *infile, int lst, int use_stdout,
mesg_f("Cannot open include file: %s\n",includePtr);
} else {
while (!feof(includeFile)) {
- getline(&incLineBuffer,&incSizeBuf,includeFile);
+ if (getline(&incLineBuffer,&incSizeBuf,includeFile) == -1)
+ break;
fprintf(fin,"%s",incLineBuffer);
if (strlen(incLineBuffer)) {
incLineCount++;

View file

@ -0,0 +1,43 @@
{ lib
, stdenv
, fetchurl
, bison
}:
stdenv.mkDerivation rec {
pname = "as31";
version = "2.3.1";
src = fetchurl {
url = "http://wiki.erazor-zone.de/_media/wiki:projects:linux:as31:${pname}-${version}.tar.gz";
name = "${pname}-${version}.tar.gz";
hash = "sha256-zSEyWHFon5nyq717Mpmdv1XZ5Hz0e8ZABqsP8M83c1U=";
};
patches = [
# Check return value of getline in run.c
./0000-getline-break.patch
];
postPatch = ''
# parser.c is generated from parser.y; it is better to generate it via bison
# instead of using the prebuilt one, especially in x86_64
rm -f as31/parser.c
'';
preConfigure = ''
chmod +x configure
'';
nativeBuildInputs = [
bison
];
meta = with lib; {
homepage = "http://wiki.erazor-zone.de/wiki:projects:linux:as31";
description = "An 8031/8051 assembler";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,31 @@
# -------------------------------------------------------------------------
# choose your compiler (must be ANSI-compliant!) and linker command, plus
# any additionally needed flags
OBJDIR = .objdir/
CC = cc
CFLAGS = -g -fomit-frame-pointer -Wall
HOST_OBJEXTENSION = .o
LD = $(CC)
LDFLAGS =
HOST_EXEXTENSION =
# no cross build
TARG_OBJDIR = $(OBJDIR)
TARG_CC = $(CC)
TARG_CFLAGS = $(CFLAGS)
TARG_OBJEXTENSION = $(HOST_OBJEXTENSION)
TARG_LD = $(LD)
TARG_LDFLAGS = $(LDFLAGS)
TARG_EXEXTENSION = $(HOST_EXEXTENSION)
# -------------------------------------------------------------------------
# directories where binaries, includes, and manpages should go during
# installation
BINDIR = @bindir@
INCDIR = @incdir@
MANDIR = @mandir@
LIBDIR = @libdir@
DOCDIR = @docdir@

View file

@ -0,0 +1,53 @@
{ lib
, stdenv
, fetchzip
, buildDocs ? false, tex
}:
stdenv.mkDerivation rec {
pname = "asl";
version = "142-bld211";
src = fetchzip {
name = "${pname}-${version}";
url = "http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/asl-current-${version}.tar.bz2";
hash = "sha256-Sbm16JX7kC/7Ws7YgNBUXNqOCl6u+RXgfNjTODhCzSM=";
};
nativeBuildInputs = lib.optionals buildDocs [ tex ];
postPatch = lib.optionalString (!buildDocs) ''
substituteInPlace Makefile --replace "all: binaries docs" "all: binaries"
'';
dontConfigure = true;
preBuild = ''
bindir="${placeholder "out"}/bin" \
docdir="${placeholder "out"}/doc/asl" \
incdir="${placeholder "out"}/include/asl" \
libdir="${placeholder "out"}/lib/asl" \
mandir="${placeholder "out"}/share/man" \
substituteAll ${./Makefile-nixos.def} Makefile.def
mkdir -p .objdir
'';
meta = with lib; {
homepage = "http://john.ccac.rwth-aachen.de:8000/as/index.html";
description = "Portable macro cross assembler";
longDescription = ''
AS is a portable macro cross assembler for a variety of microprocessors
and -controllers. Though it is mainly targeted at embedded processors and
single-board computers, you also find CPU families in the target list that
are used in workstations and PCs.
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO: multiple outputs
# TODO: cross-compilation support
# TODO: customize TeX input
# TODO: report upstream about `mkdir -p .objdir/`
# TODO: suggest upstream about building docs as an option

View file

@ -0,0 +1,27 @@
source $stdenv/setup
export JAVA_HOME=$jre
cat >> props <<EOF
output.dir=$out
context.javaPath=$jre
EOF
mkdir -p $out
$jre/bin/java -jar $src -text props
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
cat >> $out/bin/aj-runtime-env <<EOF
#! $SHELL
export CLASSPATH=$CLASSPATH:.:$out/lib/aspectjrt.jar
EOF
chmod u+x $out/bin/aj-runtime-env

View file

@ -0,0 +1,25 @@
{lib, stdenv, fetchurl, jre}:
stdenv.mkDerivation rec {
pname = "aspectj";
version = "1.9.7";
builder = ./builder.sh;
src = let
versionSnakeCase = builtins.replaceStrings ["."] ["_"] version;
in fetchurl {
url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
sha256 = "sha256-xrg88nLOcagaAsFSnnYChhlv6EKhdBqkJJTDzhUBvTo=";
};
inherit jre;
buildInputs = [jre];
meta = {
homepage = "http://www.eclipse.org/aspectj/";
description = "A seamless aspect-oriented extension to the Java programming language";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
platforms = lib.platforms.unix;
license = lib.licenses.epl10;
};
}

View file

@ -0,0 +1,16 @@
diff -Naur atasm109-old/src/Makefile atasm109-new/src/Makefile
--- atasm109-old/src/Makefile 2021-09-08 09:53:25.581598063 -0300
+++ atasm109-new/src/Makefile 2021-09-08 09:55:20.366131338 -0300
@@ -55,9 +55,9 @@
chown root.root $(DESTDIR)/atasm || true
chmod 711 $(DESTDIR)/atasm
mkdir $(DOCDIR) >/dev/null 2>&1 || echo $(DOCDIR) already exists
- cp ../atasm.txt $(DOCDIR)
- chown root.root $(DOCDIR)/atasm.txt || true
- chmod 644 $(DOCDIR)/atasm.txt
+ # cp ../atasm.txt $(DOCDIR)
+ # chown root.root $(DOCDIR)/atasm.txt || true
+ # chmod 644 $(DOCDIR)/atasm.txt
sed -e 's,%%DOCDIR%%,$(DOCDIR),g' < atasm.1.in > atasm.1
cp atasm.1 $(MANDIR)
chown root.root $(MANDIR)/atasm.1 || true

View file

@ -0,0 +1,14 @@
diff -Naur atasm109-old/src/Makefile atasm109-new/src/Makefile
--- atasm109-old/src/Makefile 2021-09-08 09:53:25.581598063 -0300
+++ atasm109-new/src/Makefile 2021-09-08 09:55:20.366131338 -0300
@@ -16,8 +16,8 @@
UNIX = -DUNIX
# Compiler flags, if you are using egcs, pgcs, or gcc >2.8.1 use:
-#CFLAGS = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH)
-CFLAGS = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH)
+CFLAGS = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH)
+#CFLAGS = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH)
L = $(ZLIB)
CC = gcc

View file

@ -0,0 +1,64 @@
{ lib
, stdenv
, fetchurl
, unzip
, zlib
}:
stdenv.mkDerivation rec {
pname = "atasm";
version = "1.09";
src = fetchurl {
url = "https://atari.miribilist.com/${pname}/${pname}${builtins.replaceStrings ["."] [""] version}.zip";
hash = "sha256-26shhw2r30GZIPz6S1rf6dOLKRpgpLwrqCRZX3+8PvA=";
};
patches = [
# make install fails because atasm.txt was moved; report to upstream
./0000-file-not-found.diff
# select flags for compilation
./0001-select-flags.diff
];
dontConfigure = true;
nativeBuildInputs = [
unzip
];
buildInputs = [
zlib
];
preBuild = ''
makeFlagsArray+=(
-C ./src
CC=cc
USEZ="-DZLIB_CAPABLE -I${zlib}/include"
ZLIB="-L${zlib}/lib -lz"
UNIX="-DUNIX"
)
'';
preInstall = ''
install -d $out/share/doc/${pname} $out/man/man1
installFlagsArray+=(
DESTDIR=$out
DOCDIR=$out/share/doc/${pname}
MANDIR=$out/man/man1
)
'';
postInstall = ''
mv docs/* $out/share/doc/${pname}
'';
meta = with lib; {
homepage = "https://atari.miribilist.com/atasm/";
description = "A commandline 6502 assembler compatible with Mac/65";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,25 @@
{ lib, stdenv, fetchurl, gmp }:
stdenv.mkDerivation rec {
pname = "ats";
version = "0.2.12";
src = fetchurl {
url = "mirror://sourceforge/ats-lang/ats-lang-anairiats-${version}.tgz";
sha256 = "0l2kj1fzhxwsklwmn5yj2vp9rmw4jg0b18bzwqz72bfi8i39736k";
};
# this is necessary because atxt files usually include some .hats files
patches = [ ./install-atsdoc-hats-files.patch ];
buildInputs = [ gmp ];
meta = {
description = "Functional programming language with dependent types";
homepage = "http://www.ats-lang.org";
license = lib.licenses.gpl3Plus;
# TODO: it looks like ATS requires gcc specifically. Someone with more knowledge
# will need to experiment.
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.thoughtpolice ];
};
}

View file

@ -0,0 +1,38 @@
--- ats-lang-anairiats-0.2.11/Makefile 2013-12-10 00:43:52.000000000 +0100
+++ ats-lang-anairiats-0.2.11/Makefile 2014-03-02 07:49:06.985837425 +0100
@@ -97,7 +97,7 @@
cd $(abs_top_srcdir)
[ -d $(bindir2) ] || $(MKDIR_P) $(bindir2)
$(MKDIR_P) $(ATSLIBHOME2)/bin
- find ccomp contrib doc libats libc prelude -type d \
+ find ccomp contrib doc libats libatsdoc libc prelude -type d \
-exec $(MKDIR_P) $(ATSLIBHOME2)/\{} \; \
-print
@@ -105,7 +105,7 @@
#
# recursively install all files in the list except .svn control files.
#
- for d in ccomp/runtime contrib doc libats libc prelude; do \
+ for d in ccomp/runtime contrib doc libats libatsdoc libc prelude; do \
cd $(abs_top_srcdir) && \
$(INSTALL) -d $(ATSLIBHOME2)/"$$d" && \
find "$$d" -name .svn -prune -o -type f \
@@ -143,6 +143,17 @@
$(INSTALL) -m 755 ats_env.sh $(bindir2)/"$$b" && \
echo [ats_env.sh] is installed into $(bindir2)/"$$b"; \
done
+#
+# install atsdoc headers
+#
+ for f in \
+ utils/atsdoc/SATS/*.sats utils/atsdoc/DATS/*.dats utils/atsdoc/HATS/*.hats; \
+ do \
+ [ -f "$$f" ] || continue; \
+ cd $(abs_top_srcdir) && \
+ $(INSTALL) -m 644 -D "$$f" $(ATSLIBHOME2)/"$$f" && \
+ echo "$$f"; \
+ done
install:: install_files

View file

@ -0,0 +1,61 @@
{ lib, stdenv, fetchurl, gmp
, withEmacsSupport ? true
, withContrib ? true }:
let
versionPkg = "0.4.2";
contrib = fetchurl {
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz";
hash = "sha256-m0hfBLsaNiLaIktcioK+ZtWUsWht3IDSJ6CzgJmS06c=";
};
postInstallContrib = lib.optionalString withContrib
''
local contribDir=$out/lib/ats2-postiats-*/ ;
mkdir -p $contribDir ;
tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
'';
postInstallEmacs = lib.optionalString withEmacsSupport
''
local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
mkdir -p $siteLispDir ;
install -m 0644 -v ./utils/emacs/*.el $siteLispDir ;
'';
in
stdenv.mkDerivation rec {
pname = "ats2";
version = versionPkg;
src = fetchurl {
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-gmp-${version}.tgz";
hash = "sha256-UWgDjFojPBYgykrCrJyYvVWY+Gc5d4aRGjTWjc528AM=";
};
buildInputs = [ gmp ];
# Disable parallel build, errors:
# *** No rule to make target 'patscc.dats', needed by 'patscc_dats.c'. Stop.
enableParallelBuilding = false;
setupHook = with lib;
let
hookFiles =
[ ./setup-hook.sh ]
++ optional withContrib ./setup-contrib-hook.sh;
in
builtins.toFile "setupHook.sh"
(concatMapStringsSep "\n" builtins.readFile hookFiles);
postInstall = postInstallContrib + postInstallEmacs;
meta = with lib; {
description = "Functional programming language with dependent types";
homepage = "http://www.ats-lang.org";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ];
};
}

View file

@ -0,0 +1 @@
export PATSHOMERELOC=@out@/lib/ats2-postiats-@version@

View file

@ -0,0 +1 @@
export PATSHOME=@out@/lib/ats2-postiats-@version@

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "avra";
version = "1.4.2";
src = fetchFromGitHub {
owner = "Ro5bert";
repo = pname;
rev = version;
hash = "sha256-joOj89WZ9Si5fcu1w1VHj5fOcnB9N2313Yb29A+nCCY=";
};
makeFlags = [ "PREFIX=${placeholder "out"}" ];
doCheck = true;
meta = with lib; {
description = "Assembler for the Atmel AVR microcontroller family";
homepage = "https://github.com/Ro5bert/avra";
license = licenses.gpl2Plus;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,74 @@
{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp
, darwin, libunistring
}:
stdenv.mkDerivation rec {
pname = "bigloo";
version = "4.4b";
src = fetchurl {
url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz";
sha256 = "sha256-oxOSJwKWmwo7PYAwmeoFrKaYdYvmvQquWXyutolc488=";
};
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.ApplicationServices
libunistring
];
propagatedBuildInputs = [ gmp ];
preConfigure =
# For libuv on darwin
lib.optionalString stdenv.isDarwin ''
export LIBTOOLIZE=libtoolize
'' +
# Help libgc's configure.
'' export CXXCPP="$CXX -E"
'';
patchPhase = ''
# Fix absolute paths.
sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g' \
-e 's=/tmp=$TMPDIR=g' -i autoconf/* \
[Mm]akefile* */[Mm]akefile* */*/[Mm]akefile* \
*/*/*/[Mm]akefile* */*/*/*/[Mm]akefile* \
comptime/Cc/cc.scm gc/install-*
# Make sure we don't change string lengths in the generated
# C files.
sed -e 's=/bin/rm= rm=g' -e 's=/bin/mv= mv=g' \
-i comptime/Cc/cc.c
'';
checkTarget = "test";
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
meta = {
description = "Efficient Scheme compiler";
homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ thoughtpolice ];
# dyld: Library not loaded: /nix/store/w3liqjlrcmzc0sf2kgwjprqgqwqx8z47-libunistring-1.0/lib/libunistring.2.dylib
# Referenced from: /private/tmp/nix-build-bigloo-4.4b.drv-0/bigloo-4.4b/bin/bigloo
# Reason: Incompatible library version: bigloo requires version 5.0.0 or later, but libunistring.2.dylib provides version 4.0.0
broken = (stdenv.isDarwin && stdenv.isx86_64);
longDescription = ''
Bigloo is a Scheme implementation devoted to one goal: enabling
Scheme based programming style where C(++) is usually
required. Bigloo attempts to make Scheme practical by offering
features usually presented by traditional programming languages
but not offered by Scheme and functional programming. Bigloo
compiles Scheme modules. It delivers small and fast stand alone
binary executables. Bigloo enables full connections between
Scheme and C programs, between Scheme and Java programs, and
between Scheme and C# programs.
'';
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, cmake, python3, fetchFromGitHub, emscripten }:
stdenv.mkDerivation rec {
pname = "binaryen";
version = "102";
src = fetchFromGitHub {
owner = "WebAssembly";
repo = "binaryen";
rev = "version_${version}";
sha256 = "sha256-UlktpY9tyjYNkmiBZM42QGg67kcPo7VDy2B4Ty1YIew=";
};
nativeBuildInputs = [ cmake python3 ];
meta = with lib; {
homepage = "https://github.com/WebAssembly/binaryen";
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
platforms = platforms.all;
maintainers = with maintainers; [ asppsa ];
license = licenses.asl20;
};
passthru.tests = {
inherit emscripten;
};
}

View file

@ -0,0 +1,51 @@
{ python3
, stdenv
, fetchFromGitLab
, gobject-introspection
, lib
, meson
, ninja
}:
stdenv.mkDerivation rec {
pname = "blueprint-compiler";
version = "unstable-2022-05-27";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "jwestman";
repo = pname;
rev = "cebd9ecadc53790cd547392899589dd5de0ac552";
sha256 = "sha256-mNR0ooJSRBIXy2E4avXYEdO1aSST+j41TsVg8+kitwo=";
};
# Requires pythonfuzz, which I've found difficult to package
doCheck = false;
nativeBuildInputs = [
meson
ninja
python3.pkgs.wrapPython
];
buildInputs = [
python3
];
propagatedBuildInputs = [
# So that the compiler can find GIR and .ui files
gobject-introspection
];
postFixup = ''
wrapPythonPrograms
'';
meta = with lib; {
description = "A markup language for GTK user interface files";
homepage = "https://gitlab.gnome.org/jwestman/blueprint-compiler";
license = licenses.lgpl3Plus;
maintainers = [ maintainers.ranfdev ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,133 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchurl
, autoconf
, automake
, fontconfig
, libX11
, perl
, flex
, bison
, pkg-config
, tcl
, tk
, xorg
, yices
, zlib
, ghc
, gmp-static
, verilog
, asciidoctor
, tex
, which
}:
let
ghcWithPackages = ghc.withPackages (g: (with g; [ old-time regex-compat syb split ]));
in stdenv.mkDerivation rec {
pname = "bluespec";
version = "2022.01";
src = fetchFromGitHub {
owner = "B-Lang-org";
repo = "bsc";
rev = version;
sha256 = "sha256-ivTua3MLa8akma3MGkhsqwSdwswYX916kywKdlj7TqY=";
};
yices-src = fetchurl {
url = "https://github.com/B-Lang-org/bsc/releases/download/${version}/yices-src-for-bsc-${version}.tar.gz";
sha256 = "sha256-ey5yIIVFZyG4EnYGqbIJqmxK1rZ70FWM0Jz+2hIoGXE=";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
# https://github.com/B-Lang-org/bsc/pull/278
patches = [ ./libstp_stub_makefile.patch ];
postUnpack = ''
mkdir -p $sourceRoot/src/vendor/yices/v2.6/yices2
tar -C $sourceRoot/src/vendor/yices/v2.6/yices2 -xf ${yices-src}
chmod -R +rwX $sourceRoot/src/vendor/yices/v2.6/yices2
'';
preBuild = ''
patchShebangs \
src/Verilog/copy_module.pl \
src/comp/update-build-version.sh \
src/comp/update-build-system.sh \
src/comp/wrapper.sh
substituteInPlace src/comp/Makefile \
--replace 'BINDDIR' 'BINDIR' \
--replace 'install-bsc install-bluetcl' 'install-bsc install-bluetcl $(UTILEXES) install-utils'
# allow running bsc to bootstrap
export LD_LIBRARY_PATH=$PWD/inst/lib/SAT
'';
buildInputs = yices.buildInputs ++ [
fontconfig
libX11 # tcltk
tcl
tk
which
xorg.libXft
zlib
];
nativeBuildInputs = [
automake
autoconf
asciidoctor
bison
flex
ghcWithPackages
perl
pkg-config
tex
];
makeFlags = [
"release"
"NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices.src instead of the subrepo)
"NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12
"LDCONFIG=ldconfig" # https://github.com/B-Lang-org/bsc/pull/43
"STP_STUB=1"
];
doCheck = true;
checkInputs = [
gmp-static
verilog
];
checkTarget = "check-smoke";
installPhase = ''
mkdir -p $out
mv inst/bin $out
mv inst/lib $out
# fragile, I know..
mkdir -p $doc/share/doc/bsc
mv inst/README $doc/share/doc/bsc
mv inst/ReleaseNotes.* $doc/share/doc/bsc
mv inst/doc/*.pdf $doc/share/doc/bsc
'';
meta = {
description = "Toolchain for the Bluespec Hardware Definition Language";
homepage = "https://github.com/B-Lang-org/bsc";
license = lib.licenses.bsd3;
platforms = [ "x86_64-linux" ];
# darwin fails at https://github.com/B-Lang-org/bsc/pull/35#issuecomment-583731562
# aarch64 fails, as GHC fails with "ghc: could not execute: opt"
maintainers = with lib.maintainers; [ jcumming thoughtpolice ];
};
}

View file

@ -0,0 +1,28 @@
diff -ru bsc-orig/src/vendor/stp/Makefile bsc-new/src/vendor/stp/Makefile
--- bsc-orig/src/vendor/stp/Makefile 1969-12-31 16:00:01.000000000 -0800
+++ bsc-new/src/vendor/stp/Makefile 2020-11-12 17:42:40.115143035 -0800
@@ -9,12 +9,13 @@
SRC = src
else
SRC = src_stub
+SNAME += lib/libstp_stub.so
endif
ifeq ($(OSTYPE), Darwin)
-SNAME=libstp.dylib
+SNAME = lib/libstp.dylib
else
-SNAME=libstp.so.1
+SNAME += lib/libstp.so.1
endif
all: install
@@ -23,7 +24,7 @@
$(MAKE) -C $(SRC) install
ln -fsn HaskellIfc include_hs
install -m 755 -d $(PREFIX)/lib/SAT
- install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
+ install -m 644 $(SNAME) $(PREFIX)/lib/SAT
clean:
$(MAKE) -C $(SRC) clean

View file

@ -0,0 +1,65 @@
# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
# to make potential future updates simpler
{ lib, stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
ocaml-version, version, src,
patches ? [],
ocaml ? (import ./ocaml.nix {
version = ocaml-version;
inherit lib stdenv;
src = "${src}/ocaml";
}),
custom-ninja ? (ninja.overrideAttrs (attrs: {
src = runCommand "ninja-patched-source" {} ''
mkdir -p $out
tar zxvf ${src}/vendor/ninja.tar.gz -C $out
'';
patches = [];
}))
}:
let
bin_folder = if stdenv.isDarwin then "darwin" else "linux";
in
stdenv.mkDerivation rec {
inherit src version patches;
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 ];
prePatch = ''
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
'';
# avoid building the development version, will break aarch64 build
dontConfigure = true;
buildPhase = ''
# This is an unfortunate name, but it's actually how to build a release
# binary for BuckleScript
npm run postinstall
'';
installPhase = ''
mkdir -p $out/bin
cp -rf jscomp lib ${bin_folder} vendor odoc_gen native bsb bsc bsrefmt $out
mkdir -p $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/bsb $out/bin/bsb
ln -s $out/bsc $out/bin/bsc
ln -s $out/bsrefmt $out/bin/bsrefmt
'';
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
let
build-bs-platform = import ./build-bs-platform.nix;
in
(build-bs-platform rec {
inherit lib stdenv runCommand fetchFromGitHub ninja nodejs python3;
version = "8.2.0";
ocaml-version = "4.06.1";
patches = [ ./jscomp-release-ninja.patch ];
src = fetchFromGitHub {
owner = "BuckleScript";
repo = "bucklescript";
rev = version;
sha256 = "1hql7sxps1k17zmwyha6idq6nw20abpq770l55ry722birclmsmf";
fetchSubmodules = true;
};
}).overrideAttrs (attrs: {
meta = with lib; {
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code";
homepage = "https://bucklescript.github.io";
license = licenses.lgpl3;
maintainers = with maintainers; [ turbomack gamb ];
platforms = platforms.all;
};
})

View file

@ -0,0 +1,16 @@
jscomp/others/release.ninja | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jscomp/others/release.ninja b/jscomp/others/release.ninja
index 9ea6d11c5..a91ed9c80 100644
--- a/jscomp/others/release.ninja
+++ b/jscomp/others/release.ninja
@@ -30,7 +30,7 @@ build others/js_json.cmj : cc_cmi others/js_json.ml | others/js_array2.cmj other
build others/js_json.cmi : cc others/js_json.mli | others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi runtime
build others/js_list.cmj : cc_cmi others/js_list.ml | others/js_array2.cmj others/js_list.cmi others/js_vector.cmj runtime
build others/js_list.cmi : cc others/js_list.mli | others/js_vector.cmi runtime
-build others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/js_mapperRt.cmi runtime
+build others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/js_array2.cmj others/js_mapperRt.cmi runtime
build others/js_mapperRt.cmi : cc others/js_mapperRt.mli | runtime
build others/js_math.cmi others/js_math.cmj : cc others/js_math.ml | others/js_int.cmj runtime
build others/js_null.cmj : cc_cmi others/js_null.ml | others/js_exn.cmj others/js_null.cmi runtime

View file

@ -0,0 +1,16 @@
{ lib, stdenv, src, version }:
stdenv.mkDerivation rec {
inherit src version;
pname = "ocaml-bs";
configurePhase = ''
./configure -prefix $out
'';
buildPhase = ''
make -j9 world.opt
'';
meta = with lib; {
branch = "4.06";
platforms = platforms.all;
};
}

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchurl, perl, coreutils }:
stdenv.mkDerivation rec {
pname = "berkeley_upc";
version = "2.22.0";
src = fetchurl {
url = "http://upc.lbl.gov/download/release/berkeley_upc-${version}.tar.gz";
sha256 = "041l215x8z1cvjcx7kwjdgiaf9rl2d778k6kiv8q09bc68nwd44m";
};
postPatch = ''
patchShebangs .
'';
# Used during the configure phase
ENVCMD = "${coreutils}/bin/env";
buildInputs = [ perl ];
meta = with lib; {
description = "A compiler for the Berkely Unified Parallel C language";
longDescription = ''
Unified Parallel C (UPC) is an extension of the C programming language
designed for high performance computing on large-scale parallel
machines.The language provides a uniform programming model for both
shared and distributed memory hardware. The programmer is presented with
a single shared, partitioned address space, where variables may be
directly read and written by any processor, but each variable is
physically associated with a single processor. UPC uses a Single Program
Multiple Data (SPMD) model of computation in which the amount of
parallelism is fixed at program startup time, typically with a single
thread of execution per processor.
'';
homepage = "https://upc.lbl.gov/";
license = licenses.mit;
platforms = with platforms; [ linux ];
maintainers = with maintainers; [ zimbatm ];
};
}

View file

@ -0,0 +1,47 @@
{ llvmPackages
, lib
, fetchFromGitHub
, cmake
, python3
}:
llvmPackages.stdenv.mkDerivation rec {
pname = "c3c";
version = "unstable-2021-07-30";
src = fetchFromGitHub {
owner = "c3lang";
repo = pname;
rev = "2246b641b16e581aec9059c8358858e10a548d94";
sha256 = "VdMKdQsedDQCnsmTxO4HnBj5GH/EThspnotvrAscSqE=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
llvmPackages.llvm
llvmPackages.lld
];
checkInputs = [ python3 ];
doCheck = true;
checkPhase = ''
( cd ../resources/testproject; ../../build/c3c build )
( cd ../test; python src/tester.py ../build/c3c test_suite )
'';
installPhase = ''
install -Dm755 c3c $out/bin/c3c
cp -r lib $out
'';
meta = with lib; {
description = "Compiler for the C3 language";
homepage = "https://github.com/c3lang/c3c";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ luc65r ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchFromGitHub, gcc }:
stdenv.mkDerivation rec {
pname = "cakelisp";
version = "0.1.0";
src = fetchFromGitHub {
owner = "makuto";
repo = "cakelisp";
rev = "v${version}";
sha256 = "126va59jy7rvy6c2wrf8j44m307f2d8jixqkc49s9wllxprj1dmg";
};
buildInputs = [ gcc ];
postPatch = ''
substituteInPlace runtime/HotReloading.cake \
--replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
substituteInPlace src/ModuleManager.cpp \
--replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic'
substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic'
substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic'
'';
buildPhase = ''
./Build.sh
'';
installPhase = ''
install -Dm755 bin/cakelisp -t $out/bin
'';
meta = with lib; {
description = "A performance-oriented Lisp-like language";
homepage = "https://github.com/makuto/cakelisp";
license = licenses.gpl3Plus;
platforms = platforms.darwin ++ platforms.linux;
maintainers = [ maintainers.sbond75 ];
};
}

View file

@ -0,0 +1,53 @@
{ lib, fetchFromGitHub, makeWrapper, clang, haskellPackages }:
haskellPackages.mkDerivation rec {
pname = "carp";
version = "0.5.4";
src = fetchFromGitHub {
owner = "carp-lang";
repo = "Carp";
rev = "v${version}";
sha256 = "sha256-o7NLd7jC1BvcoVzbD18LvHg/SqOnfn9yELUrpg2uZtY=";
};
# -Werror breaks build with GHC >= 9.0
# https://github.com/carp-lang/Carp/issues/1386
postPatch = ''
substituteInPlace CarpHask.cabal --replace "-Werror" ""
'';
buildTools = [ makeWrapper ];
executableHaskellDepends = with haskellPackages; [
HUnit blaze-markup blaze-html split ansi-terminal cmark
edit-distance hashable open-browser optparse-applicative
];
isExecutable = true;
# The carp executable must know where to find its core libraries and other
# files. Set the environment variable CARP_DIR so that it points to the root
# of the Carp repo. See:
# https://github.com/carp-lang/Carp/blob/master/docs/Install.md#setting-the-carp_dir
#
# Also, clang must be available run-time because carp is compiled to C which
# is then compiled with clang.
postInstall = ''
wrapProgram $out/bin/carp \
--set CARP_DIR $src \
--prefix PATH : ${clang}/bin
wrapProgram $out/bin/carp-header-parse \
--set CARP_DIR $src \
--prefix PATH : ${clang}/bin
'';
description = "A statically typed lisp, without a GC, for real-time applications";
homepage = "https://github.com/carp-lang/Carp";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jluttine ];
# Windows not (yet) supported.
platforms = with lib.platforms; unix ++ darwin;
}

View file

@ -0,0 +1,58 @@
{ lib, gccStdenv, fetchFromGitHub }:
gccStdenv.mkDerivation rec {
pname = "cc65";
version = "2.19";
src = fetchFromGitHub {
owner = "cc65";
repo = pname;
rev = "V${version}";
sha256 = "01a15yvs455qp20hri2pbg2wqvcip0d50kb7dibi9427hqk9cnj4";
};
makeFlags = [ "PREFIX=${placeholder "out"}" ];
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://cc65.github.io/";
description = "C compiler for processors of 6502 family";
longDescription = ''
cc65 is a complete cross development package for 65(C)02 systems,
including a powerful macro assembler, a C compiler, linker, librarian and
several other tools.
cc65 has C and runtime library support for many of the old 6502 machines,
including the following Commodore machines:
- VIC20
- C16/C116 and Plus/4
- C64
- C128
- CBM 510 (aka P500)
- the 600/700 family
- newer PET machines (not 2001).
- the Apple ][+ and successors.
- the Atari 8-bit machines.
- the Atari 2600 console.
- the Atari 5200 console.
- GEOS for the C64, C128 and Apple //e.
- the Bit Corporation Gamate console.
- the NEC PC-Engine (aka TurboGrafx-16) console.
- the Nintendo Entertainment System (NES) console.
- the Watara Supervision console.
- the VTech Creativision console.
- the Oric Atmos.
- the Oric Telestrat.
- the Lynx console.
- the Ohio Scientific Challenger 1P.
The libraries are fairly portable, so creating a version for other 6502s
shouldn't be too much work.
'';
license = licenses.zlib;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,128 @@
{ lib, stdenv, fetchurl, fetchpatch, runCommand, bootstrap_cmds, coreutils, glibc, m4, runtimeShell }:
let
options = rec {
/* TODO: there are also FreeBSD and Windows versions */
x86_64-linux = {
arch = "linuxx86";
sha256 = "0d5bsizgpw9hv0jfsf4bp5sf6kxh8f9hgzz9hsjzpfhs3npmmac4";
runtime = "lx86cl64";
kernel = "linuxx8664";
};
i686-linux = {
arch = "linuxx86";
sha256 = x86_64-linux.sha256;
runtime = "lx86cl";
kernel = "linuxx8632";
};
armv7l-linux = {
arch = "linuxarm";
sha256 = throw "ccl all-in-one linuxarm archive missing upstream";
runtime = "armcl";
kernel = "linuxarm";
};
x86_64-darwin = {
arch = "darwinx86";
sha256 = "1l060719k8mjd70lfdnr0hkybk7v88zxvfrsp7ww50q808cjffqk";
runtime = "dx86cl64";
kernel = "darwinx8664";
};
armv6l-linux = armv7l-linux;
};
cfg = options.${stdenv.hostPlatform.system} or (throw "missing source url for platform ${stdenv.hostPlatform.system}");
# The 1.12 github release of CCL seems to be missing the usual
# ccl-1.12-linuxarm.tar.gz tarball, so we build it ourselves here
linuxarm-src = runCommand "ccl-1.12-linuxarm.tar.gz" {
outer = fetchurl {
url = "https://github.com/Clozure/ccl/archive/v1.12.tar.gz";
sha256 = "0lmxhll6zgni0l41h4kcf3khbih9r0f8xni6zcfvbi3dzfs0cjkp";
};
inner = fetchurl {
url = "https://github.com/Clozure/ccl/releases/download/v1.12/linuxarm.tar.gz";
sha256 = "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c";
};
} ''
tar xf $outer
tar xf $inner -C ccl
tar czf $out ccl
'';
in
stdenv.mkDerivation rec {
pname = "ccl";
version = "1.12";
src = if cfg.arch == "linuxarm" then linuxarm-src else fetchurl {
url = "https://github.com/Clozure/ccl/releases/download/v${version}/ccl-${version}-${cfg.arch}.tar.gz";
sha256 = cfg.sha256;
};
patches = [
# Pull upstream fiux for -fno-common toolchains:
# https://github.com/Clozure/ccl/pull/316
(fetchpatch {
name = "fno-common-p1.patch";
url = "https://github.com/Clozure/ccl/commit/185dc1a00e7492f8be98e5f93b561758423595f1.patch";
sha256 = "0wqfds7346qdwdsxz3bl2p601ib94rdp9nknj7igj01q8lqfpajw";
})
(fetchpatch {
name = "fno-common-p2.patch";
url = "https://github.com/Clozure/ccl/commit/997de91062d1f152d0c3b322a1e3694243e4a403.patch";
sha256 = "10w6zw8wgalkdyya4m48lgca4p9wgcp1h44hy9wqr94dzlllq0f6";
})
];
buildInputs = if stdenv.isDarwin then [ bootstrap_cmds m4 ] else [ glibc m4 ];
CCL_RUNTIME = cfg.runtime;
CCL_KERNEL = cfg.kernel;
postPatch = if stdenv.isDarwin then ''
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
--replace "M4 = gm4" "M4 = m4" \
--replace "dtrace" "/usr/sbin/dtrace" \
--replace "/bin/rm" "${coreutils}/bin/rm" \
--replace "/bin/echo" "${coreutils}/bin/echo"
substituteInPlace lisp-kernel/m4macros.m4 \
--replace "/bin/pwd" "${coreutils}/bin/pwd"
'' else ''
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
--replace "/bin/rm" "${coreutils}/bin/rm" \
--replace "/bin/echo" "${coreutils}/bin/echo"
substituteInPlace lisp-kernel/m4macros.m4 \
--replace "/bin/pwd" "${coreutils}/bin/pwd"
'';
buildPhase = ''
make -C lisp-kernel/${CCL_KERNEL} clean
make -C lisp-kernel/${CCL_KERNEL} all
./${CCL_RUNTIME} -n -b -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)'
'';
installPhase = ''
mkdir -p "$out/share"
cp -r . "$out/share/ccl-installation"
mkdir -p "$out/bin"
echo -e '#!${runtimeShell}\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
'';
hardeningDisable = [ "format" ];
meta = with lib; {
description = "Clozure Common Lisp";
homepage = "https://ccl.clozure.com/";
maintainers = with maintainers; [ raskin muflax tohl ];
platforms = attrNames options;
# assembler failures during build, x86_64-darwin broken since 2020-10-14
broken = (stdenv.isDarwin && stdenv.isx86_64);
license = licenses.asl20;
};
}

View file

@ -0,0 +1,52 @@
{ stdenv, buildPackages, callPackage }:
let
chezSystemMap = {
# See `/workarea` of source code for list of systems
"aarch64-darwin" = "tarm64osx";
"aarch64-linux" = "tarm64le";
"armv7l-linux" = "tarm32le";
"x86_64-darwin" = "ta6osx";
"x86_64-linux" = "ta6le";
};
inherit (stdenv.hostPlatform) system;
chezSystem = chezSystemMap.${system} or (throw "Add ${system} to chezSystemMap to enable building chez-racket");
# Chez Scheme uses an ad-hoc `configure`, hence we don't use the usual
# stdenv abstractions.
forBoot = {
pname = "chez-scheme-racket-boot";
configurePhase = ''
runHook preConfigure
./configure --pb ZLIB=$ZLIB LZ4=$LZ4
runHook postConfigure
'';
makeFlags = [ "${chezSystem}.bootquick" ];
installPhase = ''
runHook preInstall
mkdir -p $out
pushd boot
mv $(ls -1 | grep -v "^pb$") -t $out
popd
runHook postInstall
'';
};
boot = buildPackages.callPackage (import ./shared.nix forBoot) {};
forFinal = {
pname = "chez-scheme-racket";
configurePhase = ''
runHook preConfigure
cp -r ${boot}/* -t ./boot
./configure -m=${chezSystem} --installprefix=$out --installman=$out/share/man ZLIB=$ZLIB LZ4=$LZ4
runHook postConfigure
'';
preBuild = ''
pushd ${chezSystem}/c
'';
postBuild = ''
popd
'';
setupHook = ./setup-hook.sh;
};
final = callPackage (import ./shared.nix forFinal) {};
in
final

View file

@ -0,0 +1,5 @@
addChezLibraryPath() {
addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site"
}
addEnvHooks "$targetOffset" addChezLibraryPath

View file

@ -0,0 +1,41 @@
args:
{ stdenv, lib, fetchFromGitHub, coreutils, darwin
, ncurses, libiconv, libX11, zlib, lz4
}:
stdenv.mkDerivation (args // {
version = "unstable-2021-12-11";
src = fetchFromGitHub {
owner = "racket";
repo = "ChezScheme";
rev = "8846c96b08561f05a937d5ecfe4edc96cc99be39";
sha256 = "IYJQzT88T8kFahx2BusDOyzz6lQDCbZIfSz9rZoNF7A=";
fetchSubmodules = true;
};
prePatch = ''
rm -rf zlib/*.c lz4/lib/*.c
'';
postPatch = ''
export ZLIB="$(find ${zlib.out}/lib -type f | sort | head -n1)"
export LZ4="$(find ${lz4.out}/lib -type f | sort | head -n1)"
'';
nativeBuildInputs = lib.optionals stdenv.isDarwin (with darwin; [ cctools autoSignDarwinBinariesHook ]);
buildInputs = [ ncurses libX11 zlib lz4 ]
++ lib.optional stdenv.isDarwin libiconv;
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
meta = {
description = "Fork of Chez Scheme for Racket";
homepage = "https://github.com/racket/ChezScheme";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ l-as ];
platforms = lib.platforms.unix;
};
})

View file

@ -0,0 +1,78 @@
{ lib, stdenv, fetchFromGitHub
, coreutils, cctools
, ncurses, libiconv, libX11, libuuid
}:
stdenv.mkDerivation rec {
pname = "chez-scheme";
version = "9.5.8";
src = fetchFromGitHub {
owner = "cisco";
repo = "ChezScheme";
rev = "refs/tags/v${version}";
sha256 = "sha256-esCWEzny/I+Ors6+upKlt4h13oN0bRLWN9OTKuSqdl8=";
fetchSubmodules = true;
};
nativeBuildInputs = lib.optional stdenv.isDarwin cctools;
buildInputs = [ ncurses libiconv libX11 libuuid ];
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
/*
** We patch out a very annoying 'feature' in ./configure, which
** tries to use 'git' to update submodules.
**
** We have to also fix a few occurrences to tools with absolute
** paths in some helper scripts, otherwise the build will fail on
** NixOS or in any chroot build.
*/
patchPhase = ''
substituteInPlace ./configure \
--replace "git submodule init && git submodule update || exit 1" "true"
substituteInPlace ./workarea \
--replace "/bin/ln" ln \
--replace "/bin/cp" cp
substituteInPlace ./makefiles/installsh \
--replace "/usr/bin/true" "${coreutils}/bin/true"
substituteInPlace zlib/configure \
--replace "/usr/bin/libtool" libtool
'';
/*
** Don't use configureFlags, since that just implicitly appends
** everything onto a --prefix flag, which ./configure gets very angry
** about.
**
** Also, carefully set a manual workarea argument, so that we
** can later easily find the machine type that we built Chez
** for.
*/
configurePhase = ''
./configure --threads --installprefix=$out --installman=$out/share/man
'';
/*
** Clean up some of the examples from the build output.
*/
postInstall = ''
rm -rf $out/lib/csv${version}/examples
'';
setupHook = ./setup-hook.sh;
meta = {
description = "A powerful and incredibly fast R6RS Scheme compiler";
homepage = "https://cisco.github.io/ChezScheme/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ thoughtpolice ];
platforms = lib.platforms.unix;
badPlatforms = [ "aarch64-linux" "aarch64-darwin" ];
};
}

View file

@ -0,0 +1,5 @@
addChezLibraryPath() {
addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site"
}
addEnvHooks "$targetOffset" addChezLibraryPath

View file

@ -0,0 +1,157 @@
From 2877f33747e3871c3a682b3a0c812b8ba2e4da5a Mon Sep 17 00:00:00 2001
From: Caolan McMahon <caolan@caolanmcmahon.com>
Date: Sat, 25 Jun 2016 11:52:28 +0100
Subject: [PATCH] Introduce CHICKEN_REPOSITORY_EXTRA
This environment variable works like CHICKEN_REPOSITORY but supports
multiple paths separated by `:'. Those paths are searched after
CHICKEN_REPOSITORY when loading extensions via `require-library' and
friends. It can be accessed and changed at runtime via the new procedure
`repository-extra-paths' which is analog to `repository-path'.
Original patch by Moritz Heidkamp.
Updated by Caolan McMahon for CHICKEN 4.11.0
---
chicken-install.scm | 29 ++++++++++++++++++++++++-----
chicken.import.scm | 1 +
eval.scm | 37 +++++++++++++++++++++++++++++++------
3 files changed, 56 insertions(+), 11 deletions(-)
diff --git a/chicken-install.scm b/chicken-install.scm
index 7bc6041..f557793 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -120,6 +120,19 @@
(sprintf "lib/chicken/~a" (##sys#fudge 42)))
(repository-path)))))
+ (define (repo-paths)
+ (if *deploy*
+ *prefix*
+ (if (and *cross-chicken* (not *host-extension*))
+ (list (make-pathname C_TARGET_LIB_HOME (sprintf "chicken/~a" C_BINARY_VERSION)))
+ (cons
+ (if *prefix*
+ (make-pathname
+ *prefix*
+ (sprintf "lib/chicken/~a" (##sys#fudge 42)))
+ (repository-path))
+ (repository-extra-paths)))))
+
(define (get-prefix #!optional runtime)
(cond ((and *cross-chicken*
(not *host-extension*))
@@ -226,10 +239,13 @@
(chicken-version) )
;; Duplication of (extension-information) to get custom
;; prefix. This should be fixed.
- ((let* ((ep (##sys#canonicalize-extension-path x 'ext-version))
- (sf (make-pathname (repo-path) ep "setup-info")))
- (and (file-exists? sf)
- (with-input-from-file sf read))) =>
+ ((let ((ep (##sys#canonicalize-extension-path x 'ext-version)))
+ (let loop ((paths (repo-paths)))
+ (cond ((null? paths) #f)
+ ((let ((sf (make-pathname (car paths) ep "setup-info")))
+ (and (file-exists? sf)
+ (with-input-from-file sf read))))
+ (else (loop (cdr paths)))))) =>
(lambda (info)
(let ((a (assq 'version info)))
(if a
@@ -776,7 +792,10 @@
"installed extension has no information about which egg it belongs to"
(pathname-file sf))
#f))))
- (glob (make-pathname (repo-path) "*" "setup-info")))
+ (append-map
+ (lambda (path)
+ (glob (make-pathname path "*" "setup-info")))
+ (repo-paths)))
equal?))
(define (list-available-extensions trans locn)
diff --git a/chicken.import.scm b/chicken.import.scm
index f6e3a19..be1637c 100644
--- a/chicken.import.scm
+++ b/chicken.import.scm
@@ -200,6 +200,7 @@
repl
repl-prompt
repository-path
+ repository-extra-paths
require
reset
reset-handler
diff --git a/eval.scm b/eval.scm
index 6242f62..f7d76d4 100644
--- a/eval.scm
+++ b/eval.scm
@@ -81,6 +81,7 @@
(define-constant source-file-extension ".scm")
(define-constant setup-file-extension "setup-info")
(define-constant repository-environment-variable "CHICKEN_REPOSITORY")
+(define-constant repository-extra-environment-variable "CHICKEN_REPOSITORY_EXTRA")
(define-constant prefix-environment-variable "CHICKEN_PREFIX")
; these are actually in unit extras, but that is used by default
@@ -1176,6 +1177,25 @@
(define ##sys#repository-path repository-path)
+(define ##sys#repository-extra-paths
+ (let* ((repaths (get-environment-variable repository-extra-environment-variable))
+ (repaths (if repaths
+ (let ((len (string-length repaths)))
+ (let loop ((i 0) (offset 0) (res '()))
+ (cond ((> i len)
+ (reverse res))
+ ((or (= i len) (eq? #\: (string-ref repaths i)))
+ (loop (+ i 1) (+ i 1) (cons (substring repaths offset i) res)))
+ (else
+ (loop (+ i 1) offset res)))))
+ '())))
+ (lambda (#!optional val)
+ (if val
+ (set! repaths val)
+ repaths))))
+
+(define repository-extra-paths ##sys#repository-extra-paths)
+
(define ##sys#setup-mode #f)
(define ##sys#find-extension
@@ -1193,6 +1213,7 @@
(let loop ((paths (##sys#append
(if ##sys#setup-mode '(".") '())
(if rp (list rp) '())
+ (##sys#repository-extra-paths)
(if inc? ##sys#include-pathnames '())
(if ##sys#setup-mode '() '("."))) ))
(and (pair? paths)
@@ -1252,12 +1273,16 @@
[string-append string-append]
[read read] )
(lambda (id loc)
- (and-let* ((rp (##sys#repository-path)))
- (let* ((p (##sys#canonicalize-extension-path id loc))
- (rpath (string-append rp "/" p ".")) )
- (cond ((file-exists? (string-append rpath setup-file-extension))
- => (cut with-input-from-file <> read) )
- (else #f) ) ) ) ) ))
+ (let loop ((rpaths (cons (##sys#repository-path) (##sys#repository-extra-paths))))
+ (and (pair? rpaths)
+ (let ((rp (car rpaths)))
+ (if (not rp)
+ (loop (cdr rpaths))
+ (let* ((p (##sys#canonicalize-extension-path id loc))
+ (rpath (string-append rp "/" p ".")) )
+ (cond ((file-exists? (string-append rpath setup-file-extension))
+ => (cut with-input-from-file <> read) )
+ (else (loop (cdr rpaths))) ) )) ))) ) ))
(define (extension-information ext)
(##sys#extension-information ext 'extension-information) )
--
2.1.4

View file

@ -0,0 +1,84 @@
{ lib, stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null }:
let
version = "4.13.0";
platform = with stdenv;
if isDarwin then "macosx"
else if isCygwin then "cygwin"
else if (isFreeBSD || isOpenBSD) then "bsd"
else if isSunOS then "solaris"
else "linux"; # Should be a sane default
in
stdenv.mkDerivation {
pname = "chicken";
inherit version;
binaryVersion = 8;
src = fetchurl {
url = "https://code.call-cc.org/releases/${version}/chicken-${version}.tar.gz";
sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd";
};
setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh;
# -fno-strict-overflow is not a supported argument in clang on darwin
hardeningDisable = lib.optionals stdenv.isDarwin ["strictoverflow"];
makeFlags = [
"PLATFORM=${platform}" "PREFIX=$(out)"
"VARDIR=$(out)/var/lib"
] ++ (lib.optionals stdenv.isDarwin [
"XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
"C_COMPILER=$(CC)"
]);
# We need a bootstrap-chicken to regenerate the c-files after
# applying a patch to add support for CHICKEN_REPOSITORY_EXTRA
patches = lib.optionals (bootstrap-chicken != null) [
./0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
];
buildInputs = [
makeWrapper
] ++ (lib.optionals (bootstrap-chicken != null) [
bootstrap-chicken
]);
preBuild = lib.optionalString (bootstrap-chicken != null) ''
# Backup the build* files - those are generated from hostname,
# git-tag, etc. and we don't need/want that
mkdir -p build-backup
mv buildid buildbranch buildtag.h build-backup
# Regenerate eval.c after the patch
make spotless $makeFlags
mv build-backup/* .
'';
postInstall = ''
for f in $out/bin/*
do
wrapProgram $f \
--prefix PATH : ${stdenv.cc}/bin
done
'';
# TODO: Assert csi -R files -p '(pathname-file (repository-path))' == binaryVersion
meta = {
homepage = "http://www.call-cc.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ corngood ];
platforms = lib.platforms.linux ++ lib.platforms.darwin; # Maybe other Unix
description = "A portable compiler for the Scheme programming language";
longDescription = ''
CHICKEN is a compiler for the Scheme programming language.
CHICKEN produces portable and efficient C, supports almost all
of the R5RS Scheme language standard, and includes many
enhancements and extensions. CHICKEN runs on Linux, macOS,
Windows, and many Unix flavours.
'';
};
}

View file

@ -0,0 +1,21 @@
{ lib, newScope } :
let
callPackage = newScope self;
self = {
pkgs = self;
fetchegg = callPackage ./fetchegg { };
eggDerivation = callPackage ./eggDerivation.nix { };
chicken = callPackage ./chicken.nix {
bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
};
chickenEggs = lib.recurseIntoAttrs (callPackage ./eggs.nix { });
egg2nix = callPackage ./egg2nix.nix { };
};
in lib.recurseIntoAttrs self

Some files were not shown because too many files have changed in this diff Show more