diff --git a/nix/camlp5.nix b/nix/camlp5.nix deleted file mode 100644 index 32622ab43f783ea7b6e2e1fd007a297bc6985414..0000000000000000000000000000000000000000 --- a/nix/camlp5.nix +++ /dev/null @@ -1,59 +0,0 @@ - -{ lib -, stdenv -, fetchFromGitHub -, findlib -, camlp-streams -, ocaml -, ocaml-compiler-libs -, perl -}: - -if lib.versionOlder ocaml.version "4.02" -|| lib.versionOlder "4.15" ocaml.version -then throw "camlp5 is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation rec { - - pname = "camlp5"; - version = "8.00.03"; - - src = fetchFromGitHub { - owner = "camlp5"; - repo = "camlp5"; - rev = "rel${version}"; - sha256 = "1fnvmaw9cland09pjx5h6w3f6fz9s23l4nbl4m9fcaa2i4dpraz6"; - }; - - buildInputs = [ findlib camlp-streams ocaml perl ]; - - prefixKey = "-prefix "; - - preConfigure = '' - configureFlagsArray=(--strict -libdir $out/lib/ocaml/${ocaml.version}/site-lib) - patchShebangs ./config/find_stuffversion.pl - patchShebangs ./etc/META.pl - ''; - - buildPhase = '' - make world.opt - make all - ''; - - dontStrip = true; - - meta = with lib; { - description = "Preprocessor-pretty-printer for OCaml"; - longDescription = '' - Camlp5 is a preprocessor and pretty-printer for OCaml programs. - It also provides parsing and printing tools. - ''; - homepage = "https://camlp5.github.io/"; - license = licenses.bsd3; - platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ - maggesi vbgl - ]; - }; -} diff --git a/nix/ocamlgraph.nix b/nix/ocamlgraph.nix deleted file mode 100644 index 66b1c4d3ec7ee8fbeba9cb9578d429173857e5f7..0000000000000000000000000000000000000000 --- a/nix/ocamlgraph.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, fetchurl, buildDunePackage, stdlib-shims }: - -buildDunePackage rec { - pname = "ocamlgraph"; - version = "2.1.0"; - - src = fetchurl { - url = "https://github.com/backtracking/ocamlgraph/releases/download/${version}/ocamlgraph-${version}.tbz"; - sha256 = "sha256-D5YsNvklPfI5OVWvQbB0tqQmsvkqne95WyAFtX0wLWU="; - }; - - minimalOCamlVersion = "4.08"; - useDune2 = true; - - propagatedBuildInputs = [ - stdlib-shims - ]; - - meta = with lib; { - homepage = "http://ocamlgraph.lri.fr/"; - downloadPage = "https://github.com/backtracking/ocamlgraph"; - description = "Graph library for OCaml"; - license = licenses.gpl2Oss; - maintainers = with maintainers; [ ]; - }; -} diff --git a/nix/ocplib-simplex.nix b/nix/ocplib-simplex.nix new file mode 100644 index 0000000000000000000000000000000000000000..474f69546d1a10929c579a3bf0366fed1f392414 --- /dev/null +++ b/nix/ocplib-simplex.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub, autoreconfHook, ocaml, findlib }: + +let + pname = "ocplib-simplex"; + version = "0.4"; +in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "OCamlPro-Iguernlala"; + repo = pname; + rev = "v${version}"; + sha256 = "09niyidrjzrj8g1qwx4wgsdf5m6cwrnzg7zsgala36jliic4di60"; + }; + + nativeBuildInputs = [ autoreconfHook ocaml findlib ]; + + strictDeps = true; + + installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; + + createFindlibDestdir = true; + + meta = { + description = "An OCaml library implementing a simplex algorithm, in a functional style, for solving systems of linear inequalities"; + homepage = "https://github.com/OCamlPro-Iguernlala/ocplib-simplex"; + inherit (ocaml.meta) platforms; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/nix/pkgs.nix b/nix/pkgs.nix index 25c355331580ddc8845fd3b16f76044ebbc0cd2e..6945e8043c4329525e805cc58b2cc70a797023f4 100644 --- a/nix/pkgs.nix +++ b/nix/pkgs.nix @@ -3,13 +3,11 @@ let ocamlOverlay = oself: osuper: { # External Packages alt-ergo = oself.callPackage ./alt-ergo.nix {}; - camlp5 = oself.callPackage ./camlp5.nix {}; combinetura = oself.callPackage ./combinetura.nix {}; headache = oself.callPackage ./headache.nix {}; mlmpfr = oself.callPackage ./mlmpfr.nix {}; - ocamlgraph = oself.callPackage ./ocamlgraph.nix {}; + ocplib-simplex = oself.callPackage ./ocplib-simplex.nix {}; why3 = oself.callPackage ./why3.nix {}; - ppx_deriving_yaml = oself.callPackage ./ppx_deriving_yaml.nix {}; # Helpers mk_tests = oself.callPackage ./mk_tests.nix {}; diff --git a/nix/ppx_deriving_yaml.nix b/nix/ppx_deriving_yaml.nix deleted file mode 100644 index 4b1e177f30bea44777844c0b7cd2bce8ede92056..0000000000000000000000000000000000000000 --- a/nix/ppx_deriving_yaml.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, buildDunePackage, fetchurl, ppxlib, alcotest, ppx_deriving, yaml }: - -buildDunePackage rec { - pname = "ppx_deriving_yaml"; - version = "0.2.1"; - - minimalOCamlVersion = "4.08"; - duneVersion = "3"; - - src = fetchurl { - url = "https://github.com/patricoferris/ppx_deriving_yaml/releases/download/v${version}/ppx_deriving_yaml-${version}.tbz"; - sha256 = "sha256-3vmay8UY7d3j96VOQ+D3oYEotzVls91F51ebXWQ/9SQ="; - }; - - propagatedBuildInputs = [ ppxlib ppx_deriving yaml ]; - - meta = { - description = "A YAML codec generator for OCaml"; - homepage = "https://github.com/patricoferris/ppx_deriving_yaml"; - license = lib.licenses.isc; - maintainers = [ ]; - }; -} diff --git a/nix/sources.json b/nix/sources.json index f88cc85ea5836aba1279476bd7f3846865c1f747..cb4337bbbcbea7ea7b46ef3304ea1af627b0eb28 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -29,10 +29,10 @@ "homepage": "https://github.com/NixOS/nixpkgs", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f292b4964cb71f9dfbbd30dc9f511d6165cd109b", - "sha256": "01yzrkrb60dd2y2y3fh4939z374hf5pa92q8axfcygqlnbk3jpb4", + "rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", + "sha256": "05i97acjry4pk1br8glwl97gbfjafq058kblpfpd39r0qr8j6x4s", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/f292b4964cb71f9dfbbd30dc9f511d6165cd109b.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/fdd898f8f79e8d2f99ed2ab6b3751811ef683242.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, "why3": {