forked from NixOS/nixpkgs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebe216b
commit fd598f1
Showing
6 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
pkgs/development/ocaml-modules/opam-modules/async/108.07.01.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
39 changes: 39 additions & 0 deletions
39
pkgs/development/ocaml-modules/opam-modules/async/setup.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
|
20 changes: 20 additions & 0 deletions
20
pkgs/development/ocaml-modules/opam-modules/async_core/108.07.01.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
20 changes: 20 additions & 0 deletions
20
pkgs/development/ocaml-modules/opam-modules/async_extra/108.07.01.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
20 changes: 20 additions & 0 deletions
20
pkgs/development/ocaml-modules/opam-modules/async_unix/108.07.01.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters