nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 63 lines 1.3 kB view raw
1{ 2 lib, 3 buildDunePackage, 4 ocaml, 5 fetchurl, 6 ppxlib, 7 alcotest, 8 mdx, 9 ppx_deriving, 10 yaml, 11}: 12 13let 14 param = 15 if lib.versionAtLeast ppxlib.version "0.36" then 16 { 17 version = "0.4.1"; 18 hash = "sha256-3CvvMEOq/3I3WJ6X5EyopiaMjshZoEMPk2K4Lx0ldSo="; 19 } 20 else 21 { 22 version = "0.4.0"; 23 hash = "sha256-MVwCFAZY9Ui1gOckfbbj882w2aloHCGmJhpL1BDUEAg="; 24 }; 25in 26 27buildDunePackage rec { 28 pname = "ppx_deriving_yaml"; 29 inherit (param) version; 30 31 env = 32 # Fix build with gcc15 33 lib.optionalAttrs 34 (lib.versions.majorMinor ocaml.version == "4.13" || lib.versions.majorMinor ocaml.version == "5.0") 35 { 36 NIX_CFLAGS_COMPILE = "-std=gnu11"; 37 }; 38 39 src = fetchurl { 40 url = "https://github.com/patricoferris/ppx_deriving_yaml/releases/download/v${version}/ppx_deriving_yaml-${version}.tbz"; 41 inherit (param) hash; 42 }; 43 44 propagatedBuildInputs = [ 45 ppxlib 46 ppx_deriving 47 yaml 48 ]; 49 50 doCheck = true; 51 checkInputs = [ 52 alcotest 53 mdx 54 ]; 55 nativeCheckInputs = [ mdx.bin ]; 56 57 meta = { 58 description = "YAML codec generator for OCaml"; 59 homepage = "https://github.com/patricoferris/ppx_deriving_yaml"; 60 license = lib.licenses.isc; 61 maintainers = [ ]; 62 }; 63}