ligo/nix/ocaml-overlay.nix
2020-03-26 13:17:37 +03:00

234 lines
8.6 KiB
Nix

{ sources ? import ./sources.nix, version ? "git" }:
self: super:
let lib = import ./lib.nix self;
in {
ocamlPackages = super.ocaml-ng.ocamlPackages_4_07.overrideScope'
(builtins.foldl' self.lib.composeExtensions (_: _: { }) [
(lib.traverseOPAMRepo' sources.opam-repository)
(lib.traverseOPAMRepo sources.tezos-opam-repository)
(lib.callOPAMPackage)
(oself: osuper:
with oself; {
ocamlfind = findlib;
lwt = lwt4;
bigstring = osuper.bigstring.overrideAttrs (_: { doCheck = false; });
xmldiff =
osuper.xmldiff.overrideAttrs (_: { src = sources.xmldiff; });
ipaddr = osuper.ipaddr.versions."4.0.0";
conduit = osuper.conduit.versions."2.1.0";
conduit-lwt-unix = osuper.conduit-lwt-unix.versions."2.0.2";
cohttp-lwt-unix = osuper.cohttp-lwt-unix.versions."2.4.0";
cohttp-lwt = osuper.cohttp-lwt.versions."2.4.0";
macaddr = osuper.macaddr.versions."4.0.0";
ocaml-migrate-parsetree = osuper.ocaml-migrate-parsetree.versions."1.4.0";
ppx_tools_versioned = osuper.ppx_tools_versioned.versions."5.2.3";
tezos-protocol-compiler = osuper.tezos-protocol-compiler.overrideAttrs
(oa: {
buildInputs = oa.buildInputs ++ [ oself.pprint ];
postInstall =
"ln -s $out/lib/ocaml/*/site-lib/tezos-protocol-compiler/* $out";
});
conf-gmp = self.gmp;
conf-libev = self.libev;
conf-hidapi = self.hidapi;
conf-pkg-config = self.pkg-config;
tezos-protocol-006-PsCARTHA =
oself.callOPAMPackage ../vendors/ligo-utils/tezos-protocol-alpha {
pname = "tezos-protocol-006-PsCARTHA";
version = "0.0.0";
opamFile = "tezos-protocol-006-PsCARTHA.opam";
} { };
tezos-protocol-006-PsCARTHA-parameters = oself.callOPAMPackage
../vendors/ligo-utils/tezos-protocol-alpha-parameters {
pname = "tezos-protocol-006-PsCARTHA-parameters";
version = "0.0.0";
} { };
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";
extraBuildInputs =
[ oself.tezos-protocol-006-PsCARTHA-parameters ];
} { };
simple-utils =
oself.callOPAMPackage ../vendors/ligo-utils/simple-utils {
pname = "simple-utils";
version = "0.1";
} { };
tezos-memory-proto-alpha =
oself.callOPAMPackage ../vendors/ligo-utils/memory-proto-alpha {
pname = "tezos-memory-proto-alpha";
version = "0.0.0";
} { };
michelson-parser = oself.callOPAMPackage
../vendors/ligo-utils/tezos-utils/michelson-parser {
pname = "michelson-parser";
version = "0.0.0";
} { ocamlfind = oself.findlib; };
ligo = oself.callOPAMPackage ../. {
version = "0.1";
extraBuildInputs = with oself; [ ppx_tools_versioned getopt ];
} { };
})
]);
}
# (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;
# };
# });
# }