git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.biniou: 1.0.9 -> 1.2.0
commitcbf5307020b4a0a473e3ca4232ebb66ce0d60bec authorVincent Laporte <Vincent.Laporte@gmail.com> dateFri 6 Oct 2017, 20:23 (9 years ago) parent96874c6
3 files changed+63−34
pkgs/development/ocaml-modules/biniou/1.0.nix+36 pkgs/development/ocaml-modules/biniou/default.nix+23−33 pkgs/top-level/ocaml-packages.nix+4−1
pkgs/development/ocaml-modules/biniou/1.0.nixnew file+36
@@ -0,0 +1,36 @@
1+{stdenv, fetchurl, ocaml, findlib, easy-format}:
2+let
3+ pname = "biniou";
4+ version = "1.0.9";
5+ webpage = "http://mjambon.com/${pname}.html";
6+in
7+
8+assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
9+
10+stdenv.mkDerivation rec {
11+
12+ name = "${pname}-${version}";
13+
14+ src = fetchurl {
15+ url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
16+ sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb";
17+ };
18+
19+ buildInputs = [ ocaml findlib easy-format ];
20+
21+ createFindlibDestdir = true;
22+
23+ makeFlags = "PREFIX=$(out)";
24+
25+ preBuild = ''
26+ mkdir $out/bin
27+ '';
28+
29+ meta = with stdenv.lib; {
30+ description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
31+ homepage = "${webpage}";
32+ license = licenses.bsd3;
33+ maintainers = [ maintainers.vbgl ];
34+ platforms = ocaml.meta.platforms or [];
35+ };
36+}
pkgs/development/ocaml-modules/biniou/default.nix+23−33
@@ -1,36 +1,26 @@
1−{stdenv, fetchurl, ocaml, findlib, easy-format}:
2−let
3− pname = "biniou";
4− version = "1.0.9";
5− webpage = "http://mjambon.com/${pname}.html";
6−in
7−
8−assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
1+{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder, easy-format }:
92
103stdenv.mkDerivation rec {
11−
12− name = "${pname}-${version}";
13−
14− src = fetchurl {
15− url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
16− sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb";
17− };
18−
19− buildInputs = [ ocaml findlib easy-format ];
20−
21− createFindlibDestdir = true;
22−
23− makeFlags = "PREFIX=$(out)";
24−
25− preBuild = ''
26− mkdir $out/bin
27− '';
28−
29− meta = with stdenv.lib; {
30− description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
31− homepage = "${webpage}";
32− license = licenses.bsd3;
33− maintainers = [ maintainers.vbgl ];
34− platforms = ocaml.meta.platforms or [];
35− };
4+ version = "1.2.0";
5+ name = "ocaml${ocaml.version}-biniou-${version}";
6+ src = fetchFromGitHub {
7+ owner = "mjambon";
8+ repo = "biniou";
9+ rev = "v${version}";
10+ sha256 = "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb";
11+ };
12+
13+ buildInputs = [ ocaml findlib jbuilder ];
14+
15+ propagatedBuildInputs = [ easy-format ];
16+
17+ inherit (jbuilder) installPhase;
18+
19+ meta = {
20+ inherit (src.meta) homepage;
21+ inherit (ocaml.meta) platforms;
22+ description = "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
23+ maintainers = [ stdenv.lib.maintainers.vbgl ];
24+ license = stdenv.lib.licenses.bsd3;
25+ };
3626}
pkgs/top-level/ocaml-packages.nix+4−1
@@ -114,7 +114,10 @@ let
114114
115115 benchmark = callPackage ../development/ocaml-modules/benchmark { };
116116
117− biniou = callPackage ../development/ocaml-modules/biniou { };
117+ biniou =
118+ if lib.versionOlder "4.02" ocaml.version
119+ then callPackage ../development/ocaml-modules/biniou { }
120+ else callPackage ../development/ocaml-modules/biniou/1.0.nix { };
118121
119122 bin_prot_p4 = callPackage ../development/ocaml-modules/bin_prot { };
120123