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
78
pkgs/development/compilers/opa/default.nix
Normal file
78
pkgs/development/compilers/opa/default.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{ lib, stdenv, fetchFromGitHub, which, perl, jdk
|
||||
, ocamlPackages, openssl
|
||||
, coreutils, zlib, ncurses, makeWrapper
|
||||
, gcc, binutils, gnumake, nodejs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opa";
|
||||
version = "4310";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MLstate";
|
||||
repo = "opalang";
|
||||
rev = "a13d45af30bc955c40c4b320353fb21e4ecacbc5";
|
||||
sha256 = "1qs91rq9xrafv2mf2v415k8lv91ab3ycz0xkpjh1mng5ca3pjlf3";
|
||||
};
|
||||
|
||||
patches = [ ./ocaml-4.03.patch ./ocaml-4.04.patch ];
|
||||
|
||||
# Paths so the opa compiler code generation will use the same programs as were
|
||||
# used to build opa.
|
||||
codeGeneratorPaths = lib.makeBinPath [ ocamlPackages.ocaml gcc binutils gnumake nodejs ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
(
|
||||
cat ./compiler/buildinfos/buildInfos.ml.pre
|
||||
./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt
|
||||
echo let opa_git_version = ${version}
|
||||
echo 'let opa_git_sha = "xxxx"'
|
||||
cat ./compiler/buildinfos/buildInfos.ml.post
|
||||
)> ./compiler/buildinfos/buildInfos.ml
|
||||
for p in configure tools/platform_helper.sh
|
||||
do
|
||||
substituteInPlace $p --replace 'IS_MAC=1' 'IS_LINUX=1'
|
||||
done
|
||||
export CAMLP4O=${ocamlPackages.camlp4}/bin/camlp4o
|
||||
export CAMLP4ORF=${ocamlPackages.camlp4}/bin/camlp4orf
|
||||
export OCAMLBUILD=${ocamlPackages.ocamlbuild}/bin/ocamlbuild
|
||||
substituteInPlace _tags --replace ', warn_error_A' ""
|
||||
'';
|
||||
|
||||
prefixKey = "-prefix ";
|
||||
|
||||
configureFlags = [ "-ocamlfind ${ocamlPackages.findlib}/bin/ocamlfind" ];
|
||||
|
||||
buildInputs = [ which perl jdk openssl coreutils zlib ncurses
|
||||
makeWrapper gcc binutils gnumake nodejs
|
||||
] ++ (with ocamlPackages; [
|
||||
ocaml findlib ssl camlzip ulex ocamlgraph camlp4
|
||||
]);
|
||||
|
||||
NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
||||
|
||||
postInstall = ''
|
||||
# Have compiler use same tools for code generation as used to build it.
|
||||
for p in $out/bin/opa ; do
|
||||
wrapProgram $p --prefix PATH ":" "${codeGeneratorPaths}" ;
|
||||
done
|
||||
|
||||
# Install emacs mode.
|
||||
mkdir -p $out/share/emacs/site-lisp/opa
|
||||
install -m 0644 -v ./tools/editors/emacs/{opa-mode.el,site-start.el} $out/share/emacs/site-lisp/opa
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A concise and elegant language for writing distributed web applications";
|
||||
longDescription = ''
|
||||
Opa is a new generation of web development platform that lets you write distributed
|
||||
web applications using a single technology. Among the the many features of Opa are these:
|
||||
Opa is concise, simple, concurrent, dynamically distributed, and secure.
|
||||
'';
|
||||
homepage = "http://opalang.org/";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [ lib.maintainers.kkallio ];
|
||||
platforms = with lib.platforms; unix;
|
||||
};
|
||||
}
|
||||
35
pkgs/development/compilers/opa/ocaml-4.03.patch
Normal file
35
pkgs/development/compilers/opa/ocaml-4.03.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
--- a/compiler/passes/surfaceAstRenaming.ml
|
||||
+++ b/compiler/passes/surfaceAstRenaming.ml
|
||||
@@ -1110,7 +1110,7 @@ let find_opt_local_or_global name all_env =
|
||||
| None -> find_opt_global name all_env
|
||||
| v -> v
|
||||
|
||||
-let path_expr_to_module_aux p = function
|
||||
+let path_expr_to_module_aux p : _ -> _ result = function
|
||||
| Some (OpenedIdent (tree, ident, path)) ->
|
||||
(match Tree.get_path_opt tree p with
|
||||
(* the path is not in the tree, which means a 'dot' access
|
||||
diff --git a/ocamllib/libbase/baseInt64.mli b/ocamllib/libbase/baseInt64.mli
|
||||
index fb544706..734437f9 100644
|
||||
--- a/ocamllib/libbase/baseInt64.mli
|
||||
+++ b/ocamllib/libbase/baseInt64.mli
|
||||
@@ -40,7 +40,9 @@ external shift_right_logical : int64 -> int -> int64 = "%int64_lsr"
|
||||
external of_int : int -> int64 = "%int64_of_int"
|
||||
external to_int : int64 -> int = "%int64_to_int"
|
||||
external of_float : float -> int64 = "caml_int64_of_float"
|
||||
+ "caml_int64_of_float_unboxed" [@@unboxed] [@@noalloc]
|
||||
external to_float : int64 -> float = "caml_int64_to_float"
|
||||
+ "caml_int64_to_float_unboxed" [@@unboxed] [@@noalloc]
|
||||
external of_int32 : int32 -> int64 = "%int64_of_int32"
|
||||
external to_int32 : int64 -> int32 = "%int64_to_int32"
|
||||
external of_nativeint : nativeint -> int64 = "%int64_of_nativeint"
|
||||
@@ -48,7 +50,9 @@ external to_nativeint : int64 -> nativeint = "%int64_to_nativeint"
|
||||
external of_string : string -> int64 = "caml_int64_of_string"
|
||||
val to_string : int64 -> string
|
||||
external bits_of_float : float -> int64 = "caml_int64_bits_of_float"
|
||||
+ "caml_int64_bits_of_float_unboxed" [@@unboxed] [@@noalloc]
|
||||
external float_of_bits : int64 -> float = "caml_int64_float_of_bits"
|
||||
+ "caml_int64_float_of_bits_unboxed" [@@unboxed] [@@noalloc]
|
||||
type t = int64
|
||||
val compare : t -> t -> int
|
||||
external format : string -> int64 -> string = "caml_int64_format"
|
||||
75
pkgs/development/compilers/opa/ocaml-4.04.patch
Normal file
75
pkgs/development/compilers/opa/ocaml-4.04.patch
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
diff --git a/compiler/libbsl/bslLib.ml b/compiler/libbsl/bslLib.ml
|
||||
index b9f75bd1..171af065 100644
|
||||
--- a/compiler/libbsl/bslLib.ml
|
||||
+++ b/compiler/libbsl/bslLib.ml
|
||||
@@ -726,7 +726,7 @@ struct
|
||||
let root elt = !(elt.root)
|
||||
let elt_name elt = elt.name
|
||||
let elts e = e
|
||||
- let children = List.map (fun e -> e.name, e)
|
||||
+ let children m = List.map (fun e -> e.name, e) m
|
||||
let is_root e = Path.is_root e.pwd
|
||||
|
||||
let parent e =
|
||||
diff --git a/compiler/passes/surfaceAstDependencies.ml b/compiler/passes/surfaceAstDependencies.ml
|
||||
index f4354a3f..81253d32 100644
|
||||
--- a/compiler/passes/surfaceAstDependencies.ml
|
||||
+++ b/compiler/passes/surfaceAstDependencies.ml
|
||||
@@ -66,7 +66,6 @@ open SurfaceAst
|
||||
|
||||
(* shorthands *)
|
||||
module SAH = SurfaceAstHelper
|
||||
-module C = SurfaceAstCons.ExprIdentCons
|
||||
module D = SurfaceAstDecons
|
||||
module S = SurfaceAst
|
||||
|
||||
diff --git a/compiler/passes/surfaceAstPasses.ml b/compiler/passes/surfaceAstPasses.ml
|
||||
index 10edf5cb..00de59fa 100644
|
||||
--- a/compiler/passes/surfaceAstPasses.ml
|
||||
+++ b/compiler/passes/surfaceAstPasses.ml
|
||||
@@ -25,7 +25,6 @@ open SurfaceAstPassesTypes
|
||||
|
||||
(* alias *)
|
||||
module C = SurfaceAstCons.ExprIdentCons
|
||||
-module CS = SurfaceAstCons.StringCons
|
||||
|
||||
|
||||
|
||||
diff --git a/compiler/qmlslicer/qmlSimpleSlicer.ml b/compiler/qmlslicer/qmlSimpleSlicer.ml
|
||||
index 2eebd96b..04ce77c8 100644
|
||||
--- a/compiler/qmlslicer/qmlSimpleSlicer.ml
|
||||
+++ b/compiler/qmlslicer/qmlSimpleSlicer.ml
|
||||
@@ -17,7 +17,6 @@
|
||||
*)
|
||||
module Format = Base.Format
|
||||
module List = Base.List
|
||||
-module String = Base.String
|
||||
module Q = QmlAst
|
||||
module Package = ObjectFiles.Package
|
||||
|
||||
diff --git a/ocamllib/libbase/baseObj.mli b/ocamllib/libbase/baseObj.mli
|
||||
index da2d9736..82d72963 100644
|
||||
--- a/ocamllib/libbase/baseObj.mli
|
||||
+++ b/ocamllib/libbase/baseObj.mli
|
||||
@@ -21,7 +21,7 @@ type t = Obj.t
|
||||
external repr : 'a -> t = "%identity"
|
||||
external obj : t -> 'a = "%identity"
|
||||
external magic : 'a -> 'b = "%identity"
|
||||
-external is_block : t -> bool = "caml_obj_is_block"
|
||||
+val [@inline always] is_block : t -> bool
|
||||
external is_int : t -> bool = "%obj_is_int"
|
||||
external tag : t -> int = "caml_obj_tag"
|
||||
external set_tag : t -> int -> unit = "caml_obj_set_tag"
|
||||
diff --git a/ocamllib/libbase/baseString.ml b/ocamllib/libbase/baseString.ml
|
||||
index 640ce2fa..6931c608 100644
|
||||
--- a/ocamllib/libbase/baseString.ml
|
||||
+++ b/ocamllib/libbase/baseString.ml
|
||||
@@ -20,7 +20,7 @@
|
||||
(* depends *)
|
||||
module Char = BaseChar
|
||||
|
||||
-include Bytes
|
||||
+include String
|
||||
|
||||
let compare_int (a:int) b = Pervasives.compare a b
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue