aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-08-09 14:00:27 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-08-09 14:00:27 +0200
commit9bd78cb0488040ea996b27e82135396a45325af5 (patch)
treefe8e48ceab8d69e7e51bd1f04ec6aae0ca7dafec /pkgs/build-support
parenta12aeebedbac1bbb02d1beec35925c433cf022f5 (diff)
parent246c223e877989c5763ce905bfa42b3f32fe2c18 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchurl/mirrors.nix7
-rw-r--r--pkgs/build-support/ocaml/oasis.nix46
2 files changed, 50 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix
index f2336db8852..d09b775d42c 100644
--- a/pkgs/build-support/fetchurl/mirrors.nix
+++ b/pkgs/build-support/fetchurl/mirrors.nix
@@ -268,13 +268,14 @@ rec {
# Apache mirrors (see http://www.apache.org/mirrors/).
apache = [
+ https://www-eu.apache.org/dist/
+ https://www-us.apache.org/dist/
http://www.eu.apache.org/dist/
- http://wwwftp.ciril.fr/pub/apache/
ftp://ftp.fu-berlin.de/unix/www/apache/
http://ftp.tudelft.nl/apache/
http://mirror.cc.columbia.edu/pub/software/apache/
- http://www.apache.org/dist/
- http://archive.apache.org/dist/ # fallback for old releases
+ https://www.apache.org/dist/
+ https://archive.apache.org/dist/ # fallback for old releases
ftp://ftp.funet.fi/pub/mirrors/apache.org/
http://apache.cs.uu.nl/
http://apache.cs.utah.edu/
diff --git a/pkgs/build-support/ocaml/oasis.nix b/pkgs/build-support/ocaml/oasis.nix
new file mode 100644
index 00000000000..74977486f2f
--- /dev/null
+++ b/pkgs/build-support/ocaml/oasis.nix
@@ -0,0 +1,46 @@
+{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
+
+{ pname, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
+ minimumOCamlVersion ? null,
+ createFindlibDestdir ? true,
+ dontStrip ? true,
+ ...
+}@args:
+
+if args ? minimumOCamlVersion &&
+ ! stdenv.lib.versionAtLeast ocaml.version args.minimumOCamlVersion
+then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
+else
+
+stdenv.mkDerivation (args // {
+ name = "ocaml${ocaml.version}-${pname}-${version}";
+
+ buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs;
+
+ inherit createFindlibDestdir;
+ inherit dontStrip;
+
+ buildPhase = ''
+ runHook preBuild
+ oasis setup
+ ocaml setup.ml -configure
+ ocaml setup.ml -build
+ runHook postBuild
+ '';
+
+ checkPhase = ''
+ runHook preCheck
+ ocaml setup.ml -test
+ runHook postCheck
+ '';
+
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $out
+ sed -i s+/usr/local+$out+g setup.ml
+ sed -i s+/usr/local+$out+g setup.data
+ prefix=$OCAMLFIND_DESTDIR ocaml setup.ml -install
+ runHook postInstall
+ '';
+
+})