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:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
65
pkgs/development/interpreters/erlang/R16B02-basho.nix
Normal file
65
pkgs/development/interpreters/erlang/R16B02-basho.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ pkgs, mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
baseName = "erlang";
|
||||
version = "16B02.basho10";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "basho";
|
||||
repo = "otp";
|
||||
rev = "OTP_R16B02_basho10";
|
||||
sha256 = "1s2c3ag9dnp6xmcr27kh95n1w50xly97n1mp8ivc2a3gpv4blqmj";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
export HOME=$PWD/../
|
||||
export LANG=C
|
||||
export ERL_TOP=$(pwd)
|
||||
sed -e s@/bin/pwd@pwd@g -i otp_build
|
||||
sed -e s@"/usr/bin/env escript"@$(pwd)/bootstrap/bin/escript@g -i lib/diameter/bin/diameterc
|
||||
|
||||
./otp_build autoconf
|
||||
'';
|
||||
|
||||
enableHipe = false;
|
||||
|
||||
# Do not install docs, instead use prebuilt versions.
|
||||
installTargets = "install";
|
||||
postInstall = let
|
||||
manpages = pkgs.fetchurl {
|
||||
url = "https://www.erlang.org/download/otp_doc_man_R16B02.tar.gz";
|
||||
sha256 = "12apxjmmd591y9g9bhr97z5jbd1jarqg7wj0y2sqhl21hc1yp75p";
|
||||
};
|
||||
in ''
|
||||
sed -e s@$(pwd)/bootstrap/bin/escript@$out/bin/escript@g -i $out/lib/erlang/lib/diameter-1.4.3/bin/diameterc
|
||||
|
||||
tar xf "${manpages}" -C "$out/lib/erlang"
|
||||
for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do
|
||||
prefix="''${i%/*}"
|
||||
mkdir -p "$out/share/man/''${prefix##*/}"
|
||||
ln -s "$i" "$out/share/man/''${prefix##*/}/''${i##*/}erl"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/basho/otp/";
|
||||
description = "Programming language used for massively scalable soft real-time systems, Basho fork";
|
||||
|
||||
longDescription = ''
|
||||
Erlang is a programming language used to build massively scalable
|
||||
soft real-time systems with requirements on high availability.
|
||||
Some of its uses are in telecoms, banking, e-commerce, computer
|
||||
telephony and instant messaging. Erlang's runtime system has
|
||||
built-in support for concurrency, distribution and fault
|
||||
tolerance.
|
||||
This version of Erlang is Basho's version, forked from Ericsson's
|
||||
repository.
|
||||
'';
|
||||
|
||||
knownVulnerabilities = [ "CVE-2017-1000385" ];
|
||||
|
||||
platforms = ["x86_64-linux" "x86_64-darwin"];
|
||||
license = pkgs.lib.licenses.asl20;
|
||||
maintainers = with pkgs.lib.maintainers; [ mdaiter ];
|
||||
};
|
||||
}
|
||||
6
pkgs/development/interpreters/erlang/R21.nix
Normal file
6
pkgs/development/interpreters/erlang/R21.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
version = "21.3.8.24";
|
||||
sha256 = "sha256-FNs+M4KFFKzfb4EG513HtyQ9eRRtxSPMpYq0bmRgY3g=";
|
||||
}
|
||||
8
pkgs/development/interpreters/erlang/R22.nix
Normal file
8
pkgs/development/interpreters/erlang/R22.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "22.3.4.24";
|
||||
sha256 = "0c9713xa8sjw7nr55hysgcnbvj7gzbrpzdl94y1nqn7vw4ni8is3";
|
||||
}
|
||||
8
pkgs/development/interpreters/erlang/R23.nix
Normal file
8
pkgs/development/interpreters/erlang/R23.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "23.3.4.10";
|
||||
sha256 = "0sfz7n748hvhmcygnvb6h31ag35p59aaa9h8gdpqsh6p4hnjh1mf";
|
||||
}
|
||||
8
pkgs/development/interpreters/erlang/R24.nix
Normal file
8
pkgs/development/interpreters/erlang/R24.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "24.2";
|
||||
sha256 = "10s57v2i2qqyg3gddm85n3crzrkikl4zfwgzqmxjzdynsyb4xg68";
|
||||
}
|
||||
8
pkgs/development/interpreters/erlang/R25.nix
Normal file
8
pkgs/development/interpreters/erlang/R25.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "25.0";
|
||||
sha256 = "1nf72yiirdpxcs8m10xc04ryghxxc73x954x38m5a6fhv2hfhp2n";
|
||||
}
|
||||
207
pkgs/development/interpreters/erlang/generic-builder.nix
Normal file
207
pkgs/development/interpreters/erlang/generic-builder.nix
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, gawk
|
||||
, gnum4
|
||||
, gnused
|
||||
, libxml2
|
||||
, libxslt
|
||||
, ncurses
|
||||
, openssl
|
||||
, perl
|
||||
, autoconf
|
||||
, openjdk11 ? null # javacSupport
|
||||
, unixODBC ? null # odbcSupport
|
||||
, libGL ? null
|
||||
, libGLU ? null
|
||||
, wxGTK ? null
|
||||
, wxmac ? null
|
||||
, xorg ? null
|
||||
, parallelBuild ? false
|
||||
, systemd
|
||||
, wxSupport ? true
|
||||
, systemdSupport ? stdenv.isLinux # systemd support in epmd
|
||||
# updateScript deps
|
||||
, writeScript
|
||||
, common-updater-scripts
|
||||
, coreutils
|
||||
, git
|
||||
}:
|
||||
{ baseName ? "erlang"
|
||||
, version
|
||||
, sha256 ? null
|
||||
, rev ? "OTP-${version}"
|
||||
, src ? fetchFromGitHub { inherit rev sha256; owner = "erlang"; repo = "otp"; }
|
||||
, enableHipe ? true
|
||||
, enableDebugInfo ? false
|
||||
, enableThreads ? true
|
||||
, enableSmpSupport ? true
|
||||
, enableKernelPoll ? true
|
||||
, javacSupport ? false
|
||||
, javacPackages ? [ openjdk11 ]
|
||||
, odbcSupport ? false
|
||||
, odbcPackages ? [ unixODBC ]
|
||||
, opensslPackage ? openssl
|
||||
, wxPackages ? [ libGL libGLU wxGTK xorg.libX11 ]
|
||||
, preUnpack ? ""
|
||||
, postUnpack ? ""
|
||||
, patches ? [ ]
|
||||
, patchPhase ? ""
|
||||
, prePatch ? ""
|
||||
, postPatch ? ""
|
||||
, configureFlags ? [ ]
|
||||
, configurePhase ? ""
|
||||
, preConfigure ? ""
|
||||
, postConfigure ? ""
|
||||
, buildPhase ? ""
|
||||
, preBuild ? ""
|
||||
, postBuild ? ""
|
||||
, installPhase ? ""
|
||||
, preInstall ? ""
|
||||
, postInstall ? ""
|
||||
, installTargets ? [ "install" "install-docs" ]
|
||||
, checkPhase ? ""
|
||||
, preCheck ? ""
|
||||
, postCheck ? ""
|
||||
, fixupPhase ? ""
|
||||
, preFixup ? ""
|
||||
, postFixup ? ""
|
||||
, meta ? { }
|
||||
}:
|
||||
|
||||
assert wxSupport -> (if stdenv.isDarwin
|
||||
then wxmac != null
|
||||
else libGL != null && libGLU != null && wxGTK != null && xorg != null);
|
||||
|
||||
assert odbcSupport -> unixODBC != null;
|
||||
assert javacSupport -> openjdk11 != null;
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalAttrs optionalString;
|
||||
wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages;
|
||||
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
# name is used instead of pname to
|
||||
# - not have to pass pnames as argument
|
||||
# - have a separate pname for erlang (main module)
|
||||
name = "${baseName}"
|
||||
+ optionalString javacSupport "_javac"
|
||||
+ optionalString odbcSupport "_odbc"
|
||||
+ "-${version}";
|
||||
|
||||
inherit src version;
|
||||
|
||||
nativeBuildInputs = [ autoconf makeWrapper perl gnum4 libxslt libxml2 ];
|
||||
|
||||
buildInputs = [ ncurses opensslPackage ]
|
||||
++ optionals wxSupport wxPackages2
|
||||
++ optionals odbcSupport odbcPackages
|
||||
++ optionals javacSupport javacPackages
|
||||
++ optional systemdSupport systemd
|
||||
++ optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ AGL Carbon Cocoa WebKit ]);
|
||||
|
||||
debugInfo = enableDebugInfo;
|
||||
|
||||
# On some machines, parallel build reliably crashes on `GEN asn1ct_eval_ext.erl` step
|
||||
enableParallelBuilding = parallelBuild;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs make
|
||||
|
||||
${postPatch}
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
./otp_build autoconf
|
||||
'';
|
||||
|
||||
configureFlags = [ "--with-ssl=${lib.getOutput "out" opensslPackage}" ]
|
||||
++ [ "--with-ssl-incl=${lib.getDev opensslPackage}" ] # This flag was introduced in R24
|
||||
++ optional enableThreads "--enable-threads"
|
||||
++ optional enableSmpSupport "--enable-smp-support"
|
||||
++ optional enableKernelPoll "--enable-kernel-poll"
|
||||
++ optional enableHipe "--enable-hipe"
|
||||
++ optional javacSupport "--with-javac"
|
||||
++ optional odbcSupport "--with-odbc=${unixODBC}"
|
||||
++ optional wxSupport "--enable-wx"
|
||||
++ optional systemdSupport "--enable-systemd"
|
||||
++ optional stdenv.isDarwin "--enable-darwin-64bit"
|
||||
++ configureFlags;
|
||||
|
||||
# install-docs will generate and install manpages and html docs
|
||||
# (PDFs are generated only when fop is available).
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
|
||||
|
||||
${postInstall}
|
||||
'';
|
||||
|
||||
# Some erlang bin/ scripts run sed and awk
|
||||
postFixup = ''
|
||||
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
|
||||
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${lib.makeBinPath [ gnused gawk ]}"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript =
|
||||
let major = builtins.head (builtins.splitVersion version);
|
||||
in
|
||||
writeScript "update.sh" ''
|
||||
#!${stdenv.shell}
|
||||
set -ox errexit
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils git gnused ]}
|
||||
latest=$(list-git-tags --url=https://github.com/erlang/otp.git | sed -n 's/^OTP-${major}/${major}/p' | sort -V | tail -1)
|
||||
if [ "$latest" != "${version}" ]; then
|
||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||
nix_file="$nixpkgs/pkgs/development/interpreters/erlang/R${major}.nix"
|
||||
update-source-version ${baseName}R${major} "$latest" --version-key=version --print-changes --file="$nix_file"
|
||||
else
|
||||
echo "${baseName}R${major} is already up-to-date"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; ({
|
||||
homepage = "https://www.erlang.org/";
|
||||
downloadPage = "https://www.erlang.org/download.html";
|
||||
description = "Programming language used for massively scalable soft real-time systems";
|
||||
|
||||
longDescription = ''
|
||||
Erlang is a programming language used to build massively scalable
|
||||
soft real-time systems with requirements on high availability.
|
||||
Some of its uses are in telecoms, banking, e-commerce, computer
|
||||
telephony and instant messaging. Erlang's runtime system has
|
||||
built-in support for concurrency, distribution and fault
|
||||
tolerance.
|
||||
'';
|
||||
|
||||
platforms = platforms.unix;
|
||||
maintainers = teams.beam.members;
|
||||
license = licenses.asl20;
|
||||
} // meta);
|
||||
}
|
||||
// optionalAttrs (preUnpack != "") { inherit preUnpack; }
|
||||
// optionalAttrs (postUnpack != "") { inherit postUnpack; }
|
||||
// optionalAttrs (patches != [ ]) { inherit patches; }
|
||||
// optionalAttrs (prePatch != "") { inherit prePatch; }
|
||||
// optionalAttrs (patchPhase != "") { inherit patchPhase; }
|
||||
// optionalAttrs (configurePhase != "") { inherit configurePhase; }
|
||||
// optionalAttrs (preConfigure != "") { inherit preConfigure; }
|
||||
// optionalAttrs (postConfigure != "") { inherit postConfigure; }
|
||||
// optionalAttrs (buildPhase != "") { inherit buildPhase; }
|
||||
// optionalAttrs (preBuild != "") { inherit preBuild; }
|
||||
// optionalAttrs (postBuild != "") { inherit postBuild; }
|
||||
// optionalAttrs (checkPhase != "") { inherit checkPhase; }
|
||||
// optionalAttrs (preCheck != "") { inherit preCheck; }
|
||||
// optionalAttrs (postCheck != "") { inherit postCheck; }
|
||||
// optionalAttrs (installPhase != "") { inherit installPhase; }
|
||||
// optionalAttrs (installTargets != [ ]) { inherit installTargets; }
|
||||
// optionalAttrs (preInstall != "") { inherit preInstall; }
|
||||
// optionalAttrs (fixupPhase != "") { inherit fixupPhase; }
|
||||
// optionalAttrs (preFixup != "") { inherit preFixup; }
|
||||
// optionalAttrs (postFixup != "") { inherit postFixup; }
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue