diff --git a/pkgs/development/ocaml-modules/opam-modules/async/108.07.01.nix b/pkgs/development/ocaml-modules/opam-modules/async/108.07.01.nix new file mode 100644 index 00000000000000..d3320a5c925cea --- /dev/null +++ b/pkgs/development/ocaml-modules/opam-modules/async/108.07.01.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, ocaml, findlib, opam_async_core_108_07_01, opam_async_unix_108_07_01, opam_async_extra_108_07_01 }: + +stdenv.mkDerivation { + name = "opam-async-108.07.01"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/108.07.01/individual/async-108.07.01.tar.gz"; + md5 = "f2b85b8a497d16c32b221aa984f425fe"; + }; + + patches = [ ./setup.patch ]; + + propagatedBuildInputs = [ocaml findlib opam_async_core_108_07_01 opam_async_unix_108_07_01 opam_async_extra_108_07_01]; + + propagatedUserEnvPackages = [ocaml findlib opam_async_core_108_07_01 opam_async_unix_108_07_01 opam_async_extra_108_07_01]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/development/ocaml-modules/opam-modules/async/setup.patch b/pkgs/development/ocaml-modules/opam-modules/async/setup.patch new file mode 100644 index 00000000000000..60043b360a49f9 --- /dev/null +++ b/pkgs/development/ocaml-modules/opam-modules/async/setup.patch @@ -0,0 +1,39 @@ +--- a/setup.ml ++++ b/setup.ml +@@ -5950,13 +5950,13 @@ let protectx x ~f ~finally = + finally x; r + + let rm_rf dir = +- ignore (Printf.ksprintf Sys.command "/bin/rm -rf %S" dir : int) ++ ignore (Printf.ksprintf Sys.command "rm -rf %S" dir : int) + + let temp_dir ?(in_dir = Filename.temp_dir_name) prefix suffix = + let base = Filename.concat in_dir prefix in + let rec loop i = + let dir = base ^ string_of_int i ^ suffix in +- let ret = Printf.ksprintf Sys.command "/bin/mkdir %S 2>/dev/null" dir in ++ let ret = Printf.ksprintf Sys.command "mkdir %S 2>/dev/null" dir in + if ret = 0 then dir + else if Sys.file_exists dir then loop (i + 1) + else failwith ("mkdir failed on " ^ dir) +@@ -6012,15 +6012,15 @@ let () = + let touch = Filename.concat dir "touch" in + protectx (open_out touch) ~finally:close_out_noerr ~f:(fun oc -> + output_string oc "\ +-#!/bin/bash ++#!/bin/sh + if [[ \"$(basename \"$1\")\" == async.mli ]]; then + exit 0 + else +- exec /bin/touch \"$@\" ++ exec touch \"$@\" + fi + "); + +- if 0 <> Printf.ksprintf Sys.command "/bin/chmod +x %S" touch then ++ if 0 <> Printf.ksprintf Sys.command "chmod +x %S" touch then + failwith ("can't chmod " ^ touch ^ "to be executable"); + + Sys.command + + diff --git a/pkgs/development/ocaml-modules/opam-modules/async_core/108.07.01.nix b/pkgs/development/ocaml-modules/opam-modules/async_core/108.07.01.nix new file mode 100644 index 00000000000000..e2a37bc523fa03 --- /dev/null +++ b/pkgs/development/ocaml-modules/opam-modules/async_core/108.07.01.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, ocaml, findlib, opam_core_108_07_01 }: + +stdenv.mkDerivation { + name = "opam-async_core-108.07.01"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/108.07.01/individual/async_core-108.07.01.tar.gz"; + md5 = "6fac99d205e41de0206cbd8862325302"; + }; + + propagatedBuildInputs = [ocaml findlib opam_core_108_07_01]; + + propagatedUserEnvPackages = [ocaml findlib opam_core_108_07_01]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/development/ocaml-modules/opam-modules/async_extra/108.07.01.nix b/pkgs/development/ocaml-modules/opam-modules/async_extra/108.07.01.nix new file mode 100644 index 00000000000000..622686b51d1bc5 --- /dev/null +++ b/pkgs/development/ocaml-modules/opam-modules/async_extra/108.07.01.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, ocaml, findlib, opam_async_core_108_07_01, opam_async_unix_108_07_01 }: + +stdenv.mkDerivation { + name = "opam-async_extra-108.07.01"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/108.07.01/individual/async_extra-108.07.01.tar.gz"; + md5 = "94106a48edcb32acb9d3161682aa3a39"; + }; + + propagatedBuildInputs = [ocaml findlib opam_async_core_108_07_01 opam_async_unix_108_07_01]; + + propagatedUserEnvPackages = [ocaml findlib opam_async_core_108_07_01 opam_async_unix_108_07_01]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/development/ocaml-modules/opam-modules/async_unix/108.07.01.nix b/pkgs/development/ocaml-modules/opam-modules/async_unix/108.07.01.nix new file mode 100644 index 00000000000000..2ceffd7dc6a6c6 --- /dev/null +++ b/pkgs/development/ocaml-modules/opam-modules/async_unix/108.07.01.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, ocaml, findlib, opam_async_core_108_07_01 }: + +stdenv.mkDerivation { + name = "opam-async_unix-108.07.01"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/108.07.01/individual/async_unix-108.07.01.tar.gz"; + md5 = "128c46c2b0dadfc9145b481b9119d0ed"; + }; + + propagatedBuildInputs = [ocaml findlib opam_async_core_108_07_01]; + + propagatedUserEnvPackages = [ocaml findlib opam_async_core_108_07_01]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fbea8ead9eb573..0ad580c2aa2c7c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2596,6 +2596,10 @@ let opam_comparelib_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/comparelib/108.07.01.nix {}; opam_core_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/core/108.07.01.nix {}; opam_core_extended_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/core_extended/108.07.01.nix {}; + opam_async_core_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/async_core/108.07.01.nix {}; + opam_async_unix_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/async_unix/108.07.01.nix {}; + opam_async_extra_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/async_extra/108.07.01.nix {}; + opam_async_108_07_01 = callPackage ../development/ocaml-modules/opam-modules/async/108.07.01.nix {}; }; ocamlPackages = recurseIntoAttrs ocamlPackages_3_12_1;