tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ocamlPackages.uri: 1.9.2 -> 1.9.5
Vincent Laporte
8 years ago
1b43f4fe
08492b31
+74
-37
3 changed files
expand all
collapse all
unified
split
pkgs
development
ocaml-modules
uri
default.nix
legacy.nix
top-level
ocaml-packages.nix
+17
-35
pkgs/development/ocaml-modules/uri/default.nix
···
1
-
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, re, stringext, ounit
2
-
, sexplib, ppx_sexp_conv
3
-
, legacyVersion ? false
4
-
, sexplib_p4
5
}:
6
7
-
if !stdenv.lib.versionAtLeast ocaml.version "4"
8
-
|| legacyVersion && stdenv.lib.versionAtLeast ocaml.version "4.03"
9
-
then throw "uri${stdenv.lib.optionalString legacyVersion "_p4"} is not available for OCaml ${ocaml.version}" else
10
11
-
with
12
-
if legacyVersion
13
-
then {
14
-
version = "1.9.1";
15
-
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
16
-
} else {
17
-
version = "1.9.2";
18
-
sha256 = "137pg8j654x7r0d1664iy2zp3l82nki1kkh921lwdrwc5qqdl6jx";
19
};
20
21
-
stdenv.mkDerivation {
22
-
name = "ocaml${ocaml.version}-uri-${version}";
23
24
-
src = fetchzip {
25
-
url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
26
-
inherit sha256;
27
-
};
28
29
-
buildInputs = [ ocaml findlib ocamlbuild ounit ]
30
-
++ stdenv.lib.optional (!legacyVersion) ppx_sexp_conv;
31
-
propagatedBuildInputs = [ re (if legacyVersion then sexplib_p4 else sexplib) stringext ];
32
33
-
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
34
-
buildPhase = ''
35
-
ocaml setup.ml -build
36
-
ocaml setup.ml -doc
37
-
'';
38
doCheck = true;
39
-
checkPhase = "ocaml setup.ml -test";
40
-
installPhase = "ocaml setup.ml -install";
41
42
-
createFindlibDestdir = true;
43
44
meta = {
45
-
homepage = https://github.com/mirage/ocaml-uri;
46
-
platforms = ocaml.meta.platforms or [];
47
description = "RFC3986 URI parsing library for OCaml";
48
license = stdenv.lib.licenses.isc;
49
-
maintainers = with stdenv.lib.maintainers; [ vbgl ];
0
50
};
51
}
···
1
+
{ stdenv, fetchurl, ocaml, findlib, jbuilder, ppx_sexp_conv, ounit
2
+
, ppx_deriving, re, sexplib, stringext
0
0
3
}:
4
5
+
stdenv.mkDerivation rec {
6
+
version = "1.9.5";
7
+
name = "ocaml${ocaml.version}-uri-${version}";
8
9
+
src = fetchurl {
10
+
url = "https://github.com/mirage/ocaml-uri/releases/download/v${version}/uri-${version}.tbz";
11
+
sha256 = "11cix26fisjbzd1kj12a78wjf3bfgaxpj8nz88bl3dssdakhswyc";
0
0
0
0
0
12
};
13
14
+
unpackCmd = "tar -xjf $curSrc";
0
15
16
+
buildInputs = [ ocaml findlib jbuilder ppx_sexp_conv ounit ];
17
+
propagatedBuildInputs = [ ppx_deriving re sexplib stringext ];
0
0
18
19
+
buildPhase = "jbuilder build";
0
0
20
0
0
0
0
0
21
doCheck = true;
22
+
checkPhase = "jbuilder runtest";
0
23
24
+
inherit (jbuilder) installPhase;
25
26
meta = {
27
+
homepage = "https://github.com/mirage/ocaml-uri";
0
28
description = "RFC3986 URI parsing library for OCaml";
29
license = stdenv.lib.licenses.isc;
30
+
maintainers = [ stdenv.lib.maintainers.vbgl ];
31
+
inherit (ocaml.meta) platforms;
32
};
33
}
+51
pkgs/development/ocaml-modules/uri/legacy.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, re, stringext, ounit
2
+
, sexplib, ppx_sexp_conv
3
+
, legacyVersion ? false
4
+
, sexplib_p4
5
+
}:
6
+
7
+
if !stdenv.lib.versionAtLeast ocaml.version "4"
8
+
|| legacyVersion && stdenv.lib.versionAtLeast ocaml.version "4.03"
9
+
then throw "uri${stdenv.lib.optionalString legacyVersion "_p4"} is not available for OCaml ${ocaml.version}" else
10
+
11
+
with
12
+
if legacyVersion
13
+
then {
14
+
version = "1.9.1";
15
+
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
16
+
} else {
17
+
version = "1.9.2";
18
+
sha256 = "137pg8j654x7r0d1664iy2zp3l82nki1kkh921lwdrwc5qqdl6jx";
19
+
};
20
+
21
+
stdenv.mkDerivation {
22
+
name = "ocaml${ocaml.version}-uri-${version}";
23
+
24
+
src = fetchzip {
25
+
url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
26
+
inherit sha256;
27
+
};
28
+
29
+
buildInputs = [ ocaml findlib ocamlbuild ounit ]
30
+
++ stdenv.lib.optional (!legacyVersion) ppx_sexp_conv;
31
+
propagatedBuildInputs = [ re (if legacyVersion then sexplib_p4 else sexplib) stringext ];
32
+
33
+
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
34
+
buildPhase = ''
35
+
ocaml setup.ml -build
36
+
ocaml setup.ml -doc
37
+
'';
38
+
doCheck = true;
39
+
checkPhase = "ocaml setup.ml -test";
40
+
installPhase = "ocaml setup.ml -install";
41
+
42
+
createFindlibDestdir = true;
43
+
44
+
meta = {
45
+
homepage = https://github.com/mirage/ocaml-uri;
46
+
platforms = ocaml.meta.platforms or [];
47
+
description = "RFC3986 URI parsing library for OCaml";
48
+
license = stdenv.lib.licenses.isc;
49
+
maintainers = with stdenv.lib.maintainers; [ vbgl ];
50
+
};
51
+
}
+6
-2
pkgs/top-level/ocaml-packages.nix
···
667
uucp = callPackage ../development/ocaml-modules/uucp { };
668
uunf = callPackage ../development/ocaml-modules/uunf { };
669
670
-
uri = callPackage ../development/ocaml-modules/uri { };
671
-
uri_p4 = callPackage ../development/ocaml-modules/uri {
0
0
0
0
672
legacyVersion = true;
673
};
674
···
667
uucp = callPackage ../development/ocaml-modules/uucp { };
668
uunf = callPackage ../development/ocaml-modules/uunf { };
669
670
+
uri =
671
+
if lib.versionAtLeast ocaml.version "4.3"
672
+
then callPackage ../development/ocaml-modules/uri { }
673
+
else callPackage ../development/ocaml-modules/uri/legacy.nix { };
674
+
675
+
uri_p4 = callPackage ../development/ocaml-modules/uri/legacy.nix {
676
legacyVersion = true;
677
};
678