ligo/nix/ocaml-overlay.nix

170 lines
5.8 KiB
Nix
Raw Normal View History

2020-03-25 22:14:18 +04:00
{ sources ? import ./sources.nix, version ? "git" }:
self: super:
let lib = import ./lib.nix self;
in {
ocamlPackages = super.ocaml-ng.ocamlPackages_4_09.overrideScope'
(builtins.foldl' self.lib.composeExtensions (_: _: { }) [
(oself: osuper:
(lib.traverseOPAMRepo (builtins.fetchTarball
"https://github.com/ocaml/opam-repository/archive/master.tar.gz") oself osuper)
// osuper)
(lib.traverseOPAMRepo ../../tezos-opam-repository)
(oself: osuper:
with oself; {
ocamlfind = findlib;
lwt = lwt4;
bigstring-unix = null;
})
]);
}
# (oself: osuper:
# let
# callTezosPackage = name: args:
# oself.callOPAMPackage "${sources.tezos}/src/lib_${
# builtins.replaceStrings [ "-" ] [ "_" ] name
# }" ({
# pname = "tezos-${name}";
# version = sources.tezos.rev;
# });
# tezos = builtins.listToAttrs (map (name: {
# name = "tezos-${name}";
# value = callTezosPackage name { } { };
# }) [
# "base"
# "event-logging"
# "micheline"
# "clic"
# "rpc"
# "error-monad"
# "stdlib"
# "crypto"
# ]);
# in tezos // {
# lwt = oself.lwt4;
# bigstring = oself.callOPAMPackage sources.bigstring {
# opamFile = "bigstring.opam";
# buildPhase = "dune build -p bigstring";
# } { bigstring-unix = null; };
# hidapi = oself.callOPAMPackage sources.hidapi {
# version = "1.1.1";
# extraBuildInputs = [ self.pkg-config ];
# } { conf-hidapi = self.hidapi; };
# crowbar = oself.callOPAMPackage sources.crowbar {
# pname = "crowbar";
# version = "0.1";
# } { };
# afl-persistent = oself.callOPAMPackage sources.ocaml-afl-persistent {
# pname = "afl-persistent";
# version = "1.1";
# } { };
# blake2 = oself.callOPAMPackage sources.blake2 {
# pname = "blake2";
# version = "0.2";
# } { };
# hacl = oself.callOPAMPackage sources.hacl {
# pname = "hacl";
# version = "0.1";
# } { };
# xmldiff = oself.callPackage
# ({ stdenv, autoreconfHook, ocaml, findlib, xmlm }:
# stdenv.mkDerivation {
# pname = "xmldiff";
# version = "0.5.0";
# src = sources.xmldiff;
# preInstall =
# "mkdir -p $out/lib/ocaml/${oself.ocaml.version}/site-lib";
# nativeBuildInputs = [ autoreconfHook ocaml findlib ];
# buildInputs = [ xmlm findlib ];
# }) { };
# json-data-encoding = oself.callOPAMPackage sources.json-data-encoding {
# opamFile = "json-data-encoding.opam";
# pname = "json-data-encoding";
# version = "0.8";
# extraBuildInputs = [ oself.crowbar ];
# } { };
# json-data-encoding-bson =
# oself.callOPAMPackage sources.json-data-encoding {
# opamFile = "json-data-encoding-bson.opam";
# pname = "json-data-encoding-bson";
# version = "0.8";
# } { };
# data-encoding = oself.callOPAMPackage sources.data-encoding {
# pname = "data-encoding";
# version = "0.0.0";
# } { };
# secp256k1-internal = oself.callOPAMPackage sources.secp256k1-internal {
# pname = "secp256k1-internal";
# version = "0.1.0";
# } { conf-gmp = self.gmp; };
# uecc = oself.callOPAMPackage sources.uecc {
# pname = "uecc";
# version = "0.1";
# } { };
# resto = oself.callOPAMPackage sources.resto {
# opamFile = "resto.opam";
# pname = "resto";
# version = "0.4";
# } { };
# resto-directory = oself.callOPAMPackage sources.resto {
# opamFile = "resto-directory.opam";
# pname = "resto-directory";
# version = "0.4";
# } { resto-json = null; };
# lwt-canceler = oself.callOPAMPackage sources.lwt-canceler {
# pname = "lwt-canceler";
# version = "0.2";
# } { };
# simple-utils =
# oself.callOPAMPackage ../vendors/ligo-utils/simple-utils {
# pname = "simple-utils";
# version = "0.1";
# } { };
# michelson-parser = oself.callOPAMPackage
# ../vendors/ligo-utils/tezos-utils/michelson-parser {
# pname = "michelson-parser";
# version = "0.0.0";
# } { ocamlfind = oself.findlib; };
# tezos-tooling = oself.callOPAMPackage "${sources.tezos}/src/tooling" {
# pname = "tezos-tooling";
# version = sources.tezos.rev;
# } { };
# tezos-protocol-environment = oself.callOPAMPackage
# "${sources.tezos}/src/lib_protocol_environment" {
# pname = "tezos-protocol-environment";
# opamFile = "tezos-protocol-environment.opam";
# version = sources.tezos.rev;
# } { };
# tezos-memory-proto-alpha =
# oself.callOPAMPackage ../vendors/ligo-utils/memory-proto-alpha {
# pname = "tezos-memory-proto-alpha";
# version = "0.0.0";
# } { };
# tezos-stdlib-unix =
# oself.callOPAMPackage "${sources.tezos}/src/lib_stdlib_unix" {
# pname = "tezos-stdlib-unix";
# version = sources.tezos.rev;
# extraBuildInputs = [ oself.fmt ];
# } { conf-libev = self.libev; };
# tezos-protocol-alpha = null;
# tezos-protocol-006-PsCARTHA = null;
# tezos-protocol-environment-sigs = null;
# tezos-data-encoding = null;
# tezos-utils = oself.callOPAMPackage ../vendors/ligo-utils/tezos-utils {
# pname = "tezos-utils";
# version = "0.1";
# } { };
# proto-alpha-utils =
# oself.callOPAMPackage ../vendors/ligo-utils/proto-alpha-utils {
# pname = "proto-alpha-utils";
# version = "0.1";
# } { };
# terminal_size = oself.callOPAMPackage sources.terminal_size {
# pname = "terminal_size";
# version = "0.1.4";
# } { };
# ligo = oself.callOPAMPackage ../. { version = "0.1"; } {
# ocamlfind = oself.findlib;
# };
# });
# }