···75 ppx_let,
76}:
7778-buildDunePackage rec {
79 pname = "angstrom";
80 version = "0.15.0";
81···84 src = fetchFromGitHub {
85 owner = "inhabitedtype";
86 repo = "angstrom";
87- tag = version;
88 hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI=";
89 };
9091- checkInputs = [
92- alcotest
93- ppx_let
94- ];
95 buildInputs = [ ocaml-syntax-shims ];
096 propagatedBuildInputs = [
97 bigstringaf
98 result
99 ];
0100 doCheck = lib.versionAtLeast ocaml.version "4.05";
0000101102 meta = {
103 homepage = "https://github.com/inhabitedtype/angstrom";
···105 license = lib.licenses.bsd3;
106 maintainers = with lib.maintainers; [ sternenseemann ];
107 };
108-}
109```
110111Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it.
···117 buildDunePackage,
118}:
119120-buildDunePackage rec {
121 pname = "wtf8";
122 version = "1.0.2";
123124 minimalOCamlVersion = "4.02";
125126 src = fetchurl {
127- url = "https://github.com/flowtype/ocaml-wtf8/releases/download/v${version}/wtf8-v${version}.tbz";
128 hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc=";
129 };
130···134 license = lib.licenses.mit;
135 maintainers = [ lib.maintainers.eqyiel ];
136 };
137-}
138```
139140The build will automatically fail if two distinct versions of the same library
···75 ppx_let,
76}:
7778+buildDunePackage (finalAttrs: {
79 pname = "angstrom";
80 version = "0.15.0";
81···84 src = fetchFromGitHub {
85 owner = "inhabitedtype";
86 repo = "angstrom";
87+ tag = finalAttrs.version;
88 hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI=";
89 };
90000091 buildInputs = [ ocaml-syntax-shims ];
92+93 propagatedBuildInputs = [
94 bigstringaf
95 result
96 ];
97+98 doCheck = lib.versionAtLeast ocaml.version "4.05";
99+ checkInputs = [
100+ alcotest
101+ ppx_let
102+ ];
103104 meta = {
105 homepage = "https://github.com/inhabitedtype/angstrom";
···107 license = lib.licenses.bsd3;
108 maintainers = with lib.maintainers; [ sternenseemann ];
109 };
110+})
111```
112113Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it.
···119 buildDunePackage,
120}:
121122+buildDunePackage (finalAtts: {
123 pname = "wtf8";
124 version = "1.0.2";
125126 minimalOCamlVersion = "4.02";
127128 src = fetchurl {
129+ url = "https://github.com/flowtype/ocaml-wtf8/releases/download/v${finalAtts.version}/wtf8-v${finalAtts.version}.tbz";
130 hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc=";
131 };
132···136 license = lib.licenses.mit;
137 maintainers = [ lib.maintainers.eqyiel ];
138 };
139+})
140```
141142The build will automatically fail if two distinct versions of the same library