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
26
pkgs/development/tools/parsing/antlr/2.7.7-fixes.patch
Normal file
26
pkgs/development/tools/parsing/antlr/2.7.7-fixes.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/lib/cpp/antlr/CharScanner.hpp b/lib/cpp/antlr/CharScanner.hpp
|
||||
index 8a97e97..1835a3e 100644
|
||||
--- a/lib/cpp/antlr/CharScanner.hpp
|
||||
+++ b/lib/cpp/antlr/CharScanner.hpp
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <antlr/config.hpp>
|
||||
|
||||
#include <map>
|
||||
+#include <cstdio>
|
||||
+#include <cstring>
|
||||
|
||||
#ifdef HAS_NOT_CCTYPE_H
|
||||
#include <ctype.h>
|
||||
diff --git a/scripts/config.make.in b/scripts/config.make.in
|
||||
index c23dd5c..6057309 100644
|
||||
--- a/scripts/config.make.in
|
||||
+++ b/scripts/config.make.in
|
||||
@@ -38,7 +38,7 @@ MAKEOVERRIDES := $(patsubst SUBDIRS=%,,$(MAKEOVERRIDES))
|
||||
all clean distclean test install force-target clean-target ::
|
||||
@dirs="$(SUBDIRS)" ; \
|
||||
test -z "$${dirs}" && { \
|
||||
- dirs=`/bin/ls` ; \
|
||||
+ dirs=`ls` ; \
|
||||
} ; \
|
||||
for d in . $${dirs} ; do \
|
||||
case $${d} in \
|
||||
27
pkgs/development/tools/parsing/antlr/2.7.7.nix
Normal file
27
pkgs/development/tools/parsing/antlr/2.7.7.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl, jdk, python2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "antlr";
|
||||
version = "2.7.7";
|
||||
src = fetchurl {
|
||||
url = "https://www.antlr2.org/download/antlr-${version}.tar.gz";
|
||||
sha256 = "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5";
|
||||
};
|
||||
patches = [ ./2.7.7-fixes.patch ];
|
||||
buildInputs = [ jdk ];
|
||||
nativeBuildInputs = [ python2 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful parser generator";
|
||||
longDescription = ''
|
||||
ANTLR (ANother Tool for Language Recognition) is a powerful parser
|
||||
generator for reading, processing, executing, or translating structured
|
||||
text or binary files. It's widely used to build languages, tools, and
|
||||
frameworks. From a grammar, ANTLR generates a parser that can build and
|
||||
walk parse trees.
|
||||
'';
|
||||
homepage = "https://www.antlr.org/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
40
pkgs/development/tools/parsing/antlr/3.4.nix
Normal file
40
pkgs/development/tools/parsing/antlr/3.4.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{lib, stdenv, fetchurl, jre}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "antlr";
|
||||
version = "3.4";
|
||||
src = fetchurl {
|
||||
url ="https://www.antlr3.org/download/antlr-${version}-complete.jar";
|
||||
sha256 = "1xqbam8vf04q5fasb0m2n1pn5dbp2yw763sj492ncq04c5mqcglx";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{lib/antlr,bin}
|
||||
cp "$src" "$out/lib/antlr/antlr-${version}-complete.jar"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
|
||||
echo "'${jre}/bin/java' -cp '$out/lib/antlr/antlr-${version}-complete.jar' -Xms200M -Xmx400M org.antlr.Tool \"\$@\"" >> "$out/bin/antlr"
|
||||
|
||||
chmod a+x "$out/bin/antlr"
|
||||
ln -s "$out/bin/antlr"{,3}
|
||||
'';
|
||||
|
||||
inherit jre;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful parser generator";
|
||||
longDescription = ''
|
||||
ANTLR (ANother Tool for Language Recognition) is a powerful parser
|
||||
generator for reading, processing, executing, or translating structured
|
||||
text or binary files. It's widely used to build languages, tools, and
|
||||
frameworks. From a grammar, ANTLR generates a parser that can build and
|
||||
walk parse trees.
|
||||
'';
|
||||
homepage = "https://www.antlr.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
53
pkgs/development/tools/parsing/antlr/3.5.nix
Normal file
53
pkgs/development/tools/parsing/antlr/3.5.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{lib, stdenv, fetchpatch, fetchurl, fetchFromGitHub, jre}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "antlr";
|
||||
version = "3.5.2";
|
||||
jar = fetchurl {
|
||||
url = "https://www.antlr3.org/download/antlr-${version}-complete.jar";
|
||||
sha256 = "0srjwxipwsfzmpi0v32d1l5lzk9gi5in8ayg33sq8wyp8ygnbji6";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "antlr";
|
||||
repo = "antlr3";
|
||||
rev = "5c2a916a10139cdb5c7c8851ee592ed9c3b3d4ff";
|
||||
sha256 = "1i0w2v9prrmczlwkfijfp4zfqfgrss90a7yk2hg3y0gkg2s4abbk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://src.fedoraproject.org/rpms/antlr3/raw/f1bb8d639678047935e1761c3bf3c1c7da8d0f1d/f/0006-antlr3memory.hpp-fix-for-C-20-mode.patch";
|
||||
sha256 = "0apk904afjqbad6c7z9r72a9lkbz69vwrl8j2a6zgxjn8dfb2p8b";
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{lib/antlr,bin,include}
|
||||
cp "$jar" "$out/lib/antlr/antlr-${version}-complete.jar"
|
||||
cp runtime/Cpp/include/* $out/include/
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
|
||||
echo "'${jre}/bin/java' -cp '$out/lib/antlr/antlr-${version}-complete.jar' -Xms200M -Xmx400M org.antlr.Tool \"\$@\"" >> "$out/bin/antlr"
|
||||
|
||||
chmod a+x "$out/bin/antlr"
|
||||
ln -s "$out/bin/antlr"{,3}
|
||||
'';
|
||||
|
||||
inherit jre;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful parser generator";
|
||||
longDescription = ''
|
||||
ANTLR (ANother Tool for Language Recognition) is a powerful parser
|
||||
generator for reading, processing, executing, or translating structured
|
||||
text or binary files. It's widely used to build languages, tools, and
|
||||
frameworks. From a grammar, ANTLR generates a parser that can build and
|
||||
walk parse trees.
|
||||
'';
|
||||
homepage = "https://www.antlr.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ lib.maintainers.farlion ];
|
||||
};
|
||||
}
|
||||
89
pkgs/development/tools/parsing/antlr/4.8.nix
Normal file
89
pkgs/development/tools/parsing/antlr/4.8.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
{ lib, stdenv, fetchurl, jre
|
||||
, fetchFromGitHub, cmake, ninja, pkg-config, libuuid, darwin }:
|
||||
|
||||
let
|
||||
version = "4.8";
|
||||
source = fetchFromGitHub {
|
||||
owner = "antlr";
|
||||
repo = "antlr4";
|
||||
rev = version;
|
||||
sha256 = "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m";
|
||||
};
|
||||
|
||||
runtime = {
|
||||
cpp = stdenv.mkDerivation {
|
||||
pname = "antlr-runtime-cpp";
|
||||
inherit version;
|
||||
src = source;
|
||||
|
||||
outputs = [ "out" "dev" "doc" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ninja pkg-config ];
|
||||
buildInputs = lib.optional stdenv.isLinux libuuid
|
||||
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreFoundation;
|
||||
|
||||
# Install CMake config files, used to locate the runtime from another
|
||||
# CMake project, using the find_package function.
|
||||
cmakeFlags = [ "-DANTLR4_INSTALL=ON" ];
|
||||
|
||||
postUnpack = ''
|
||||
export sourceRoot=$sourceRoot/runtime/Cpp
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ target for ANTLR 4";
|
||||
homepage = "https://www.antlr.org/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
antlr = stdenv.mkDerivation {
|
||||
pname = "antlr";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url ="https://www.antlr.org/download/antlr-${version}-complete.jar";
|
||||
sha256 = "0nms976cnqyr1ndng3haxkmknpdq6xli4cpf4x4al0yr21l9v93k";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{share/java,bin}
|
||||
cp "$src" "$out/share/java/antlr-${version}-complete.jar"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
|
||||
echo "'${jre}/bin/java' -cp '$out/share/java/antlr-${version}-complete.jar:$CLASSPATH' -Xmx500M org.antlr.v4.Tool \"\$@\"" >> "$out/bin/antlr"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/grun"
|
||||
echo "'${jre}/bin/java' -cp '$out/share/java/antlr-${version}-complete.jar:$CLASSPATH' org.antlr.v4.gui.TestRig \"\$@\"" >> "$out/bin/grun"
|
||||
|
||||
chmod a+x "$out/bin/antlr" "$out/bin/grun"
|
||||
ln -s "$out/bin/antlr"{,4}
|
||||
'';
|
||||
|
||||
inherit jre;
|
||||
|
||||
passthru = {
|
||||
inherit runtime;
|
||||
jarLocation = "${antlr}/share/java/antlr-${version}-complete.jar";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful parser generator";
|
||||
longDescription = ''
|
||||
ANTLR (ANother Tool for Language Recognition) is a powerful parser
|
||||
generator for reading, processing, executing, or translating structured
|
||||
text or binary files. It's widely used to build languages, tools, and
|
||||
frameworks. From a grammar, ANTLR generates a parser that can build and
|
||||
walk parse trees.
|
||||
'';
|
||||
homepage = "https://www.antlr.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
in antlr
|
||||
88
pkgs/development/tools/parsing/antlr/4.9.nix
Normal file
88
pkgs/development/tools/parsing/antlr/4.9.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{ lib, stdenv, fetchurl, jre
|
||||
, fetchpatch, fetchFromGitHub, cmake, ninja, pkg-config, libuuid, utf8cpp, darwin }:
|
||||
|
||||
let
|
||||
version = "4.9.3";
|
||||
source = fetchFromGitHub {
|
||||
owner = "antlr";
|
||||
repo = "antlr4";
|
||||
rev = version;
|
||||
sha256 = "1af3cfqwk7lq1b5qsh1am0922fyhy7wmlpnrqdnvch3zzza9n1qm";
|
||||
};
|
||||
|
||||
runtime = {
|
||||
cpp = stdenv.mkDerivation {
|
||||
pname = "antlr-runtime-cpp";
|
||||
inherit version;
|
||||
src = source;
|
||||
|
||||
outputs = [ "out" "dev" "doc" ];
|
||||
|
||||
patchFlags = [ "-p3" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ninja pkg-config ];
|
||||
buildInputs = [ utf8cpp ]
|
||||
++ lib.optional stdenv.isLinux libuuid
|
||||
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreFoundation;
|
||||
|
||||
postUnpack = ''
|
||||
export sourceRoot=$sourceRoot/runtime/Cpp
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ target for ANTLR 4";
|
||||
homepage = "https://www.antlr.org/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
antlr = stdenv.mkDerivation {
|
||||
pname = "antlr";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.antlr.org/download/antlr-${version}-complete.jar";
|
||||
sha256 = "0dnz2x54kigc58bxnynjhmr5iq49f938vj6p50gdir1xdna41kdg";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{share/java,bin}
|
||||
cp "$src" "$out/share/java/antlr-${version}-complete.jar"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
|
||||
echo "'${jre}/bin/java' -cp '$out/share/java/antlr-${version}-complete.jar:$CLASSPATH' -Xmx500M org.antlr.v4.Tool \"\$@\"" >> "$out/bin/antlr"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/grun"
|
||||
echo "'${jre}/bin/java' -cp '$out/share/java/antlr-${version}-complete.jar:$CLASSPATH' org.antlr.v4.gui.TestRig \"\$@\"" >> "$out/bin/grun"
|
||||
|
||||
chmod a+x "$out/bin/antlr" "$out/bin/grun"
|
||||
ln -s "$out/bin/antlr"{,4}
|
||||
'';
|
||||
|
||||
inherit jre;
|
||||
|
||||
passthru = {
|
||||
inherit runtime;
|
||||
jarLocation = "${antlr}/share/java/antlr-${version}-complete.jar";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful parser generator";
|
||||
longDescription = ''
|
||||
ANTLR (ANother Tool for Language Recognition) is a powerful parser
|
||||
generator for reading, processing, executing, or translating structured
|
||||
text or binary files. It's widely used to build languages, tools, and
|
||||
frameworks. From a grammar, ANTLR generates a parser that can build and
|
||||
walk parse trees.
|
||||
'';
|
||||
homepage = "https://www.antlr.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
in antlr
|
||||
23
pkgs/development/tools/parsing/antlr/builder.sh
Normal file
23
pkgs/development/tools/parsing/antlr/builder.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
source $stdenv/setup
|
||||
|
||||
tar zxvf $src
|
||||
cd antlr-*
|
||||
cd lib
|
||||
|
||||
mkdir -p $out/lib/antlr
|
||||
mkdir -p $out/bin
|
||||
|
||||
cp *.jar $out/lib/antlr
|
||||
|
||||
classpath=""
|
||||
for jar in $out/lib/antlr/*.jar; do
|
||||
classpath="$classpath:$jar"
|
||||
done
|
||||
|
||||
cat > $out/bin/antlr <<EOF
|
||||
#! $SHELL
|
||||
|
||||
$jre/bin/java -cp $classpath -Xms200M -Xmx400M org.antlr.Tool \$*
|
||||
EOF
|
||||
|
||||
chmod u+x $out/bin/antlr
|
||||
Loading…
Add table
Add a link
Reference in a new issue