From c81a2e6a1ee5cc4f4571b480599af9e33da70353 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Sun, 5 Jan 2020 14:10:50 -0500 Subject: [PATCH] ocamlPackages.npy: init at unstable-2019-04-02 --- .../development/ocaml-modules/npy/default.nix | 27 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/ocaml-modules/npy/default.nix diff --git a/pkgs/development/ocaml-modules/npy/default.nix b/pkgs/development/ocaml-modules/npy/default.nix new file mode 100644 index 00000000000..87fd72b7567 --- /dev/null +++ b/pkgs/development/ocaml-modules/npy/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchFromGitHub, numpy, camlzip }: + +buildDunePackage rec { + pname = "npy"; + version = "unstable-2019-04-02"; + + minimumOCamlVersion = "4.06"; + + src = fetchFromGitHub { + owner = "LaurentMazare"; + repo = "${pname}-ocaml"; + rev = "c051086bfea6bee58208098bcf1c2f725a80a1fb"; + sha256 = "06mgrnm7xiw2lhqvbdv2zmd65sqfdnjd7j4qmcswanmplm17yhvb"; + }; + + propagatedBuildInputs = [ camlzip ]; + checkInputs = [ numpy ]; + + doCheck = true; + + meta = with lib; { + inherit (src.meta) homepage; + description = "OCaml implementation of the Npy format spec"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.asl20; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 56ae90ae392..baa1d862e53 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -558,6 +558,10 @@ let lwt = ocaml_lwt; }; + npy = callPackage ../development/ocaml-modules/npy { + inherit (pkgs.python3Packages) numpy; + }; + num = if lib.versionOlder "4.06" ocaml.version then callPackage ../development/ocaml-modules/num {} else null;