···7575 ppx_let,
7676}:
77777878-buildDunePackage rec {
7878+buildDunePackage (finalAttrs: {
7979 pname = "angstrom";
8080 version = "0.15.0";
8181···8484 src = fetchFromGitHub {
8585 owner = "inhabitedtype";
8686 repo = "angstrom";
8787- tag = version;
8787+ tag = finalAttrs.version;
8888 hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI=";
8989 };
90909191- checkInputs = [
9292- alcotest
9393- ppx_let
9494- ];
9591 buildInputs = [ ocaml-syntax-shims ];
9292+9693 propagatedBuildInputs = [
9794 bigstringaf
9895 result
9996 ];
9797+10098 doCheck = lib.versionAtLeast ocaml.version "4.05";
9999+ checkInputs = [
100100+ alcotest
101101+ ppx_let
102102+ ];
101103102104 meta = {
103105 homepage = "https://github.com/inhabitedtype/angstrom";
···105107 license = lib.licenses.bsd3;
106108 maintainers = with lib.maintainers; [ sternenseemann ];
107109 };
108108-}
110110+})
109111```
110112111113Here 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.
···117119 buildDunePackage,
118120}:
119121120120-buildDunePackage rec {
122122+buildDunePackage (finalAtts: {
121123 pname = "wtf8";
122124 version = "1.0.2";
123125124126 minimalOCamlVersion = "4.02";
125127126128 src = fetchurl {
127127- url = "https://github.com/flowtype/ocaml-wtf8/releases/download/v${version}/wtf8-v${version}.tbz";
129129+ url = "https://github.com/flowtype/ocaml-wtf8/releases/download/v${finalAtts.version}/wtf8-v${finalAtts.version}.tbz";
128130 hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc=";
129131 };
130132···134136 license = lib.licenses.mit;
135137 maintainers = [ lib.maintainers.eqyiel ];
136138 };
137137-}
139139+})
138140```
139141140142The build will automatically fail if two distinct versions of the same library