nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchurl,
4 buildDunePackage,
5 seq,
6}:
7
8buildDunePackage (finalAttrs: {
9 pname = "yojson";
10 version = "3.0.0";
11
12 src = fetchurl {
13 url = "https://github.com/ocaml-community/yojson/releases/download/${finalAttrs.version}/yojson-${finalAttrs.version}.tbz";
14 hash =
15 {
16 "3.0.0" = "sha256-mUFNp2CbkqAkdO9LSezaFe3Iy7pSKTQbEk5+RpXDlhA=";
17 "2.2.2" = "sha256-mr+tjJp51HI60vZEjmacHmjb/IfMVKG3wGSwyQkSxZU=";
18 }
19 ."${finalAttrs.version}";
20 };
21
22 propagatedBuildInputs = lib.optional (!lib.versionAtLeast finalAttrs.version "3.0.0") seq;
23
24 meta = {
25 description = "Optimized parsing and printing library for the JSON format";
26 homepage = "https://github.com/ocaml-community/yojson";
27 license = lib.licenses.bsd3;
28 maintainers = [ lib.maintainers.vbgl ];
29 mainProgram = "ydump";
30 };
31})