nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 137 lines 3.8 kB view raw
1{ 2 lib, 3 fetchurl, 4 fetchFromGitHub, 5 buildDunePackage, 6 ocaml, 7 version ? 8 if lib.versionAtLeast ocaml.version "4.07" then 9 if lib.versionAtLeast ocaml.version "4.08" then 10 if lib.versionAtLeast ocaml.version "4.11" then 11 if lib.versionAtLeast ocaml.version "5.03" then 12 if lib.versionAtLeast ocaml.version "5.04" then "0.37.0" else "0.36.2" 13 else 14 "0.34.0" 15 else 16 "0.24.0" 17 else 18 "0.15.0" 19 else 20 "0.13.0", 21 ocaml-compiler-libs, 22 ocaml-migrate-parsetree, 23 ppx_derivers, 24 stdio, 25 stdlib-shims, 26 ocaml-migrate-parsetree-2, 27}: 28 29let 30 param = 31 { 32 "0.8.1" = { 33 sha256 = "sha256-pct57oO7qAMEtlvEfymFOCvviWaLG0b5/7NzTC8vdSE="; 34 max_version = "4.10"; 35 OMP = [ ocaml-migrate-parsetree ]; 36 }; 37 "0.13.0" = { 38 sha256 = "sha256-geHz0whQDg5/YQjVsN2iuHlkClwh7z3Eqb2QOBzuOdk="; 39 min_version = "4.07"; 40 max_version = "4.11"; 41 OMP = [ ocaml-migrate-parsetree ]; 42 }; 43 "0.15.0" = { 44 sha256 = "sha256-C2MNf410qJmlXMJxiLXOA+c1qT8H6gwt5WUy2P2TszA="; 45 min_version = "4.07"; 46 max_version = "4.12"; 47 OMP = [ ocaml-migrate-parsetree ]; 48 }; 49 "0.18.0" = { 50 sha256 = "sha256-nUg8NkZ64GHHDfcWbtFGXq3MNEKu+nYPtcVDm/gEfcM="; 51 min_version = "4.07"; 52 max_version = "4.12"; 53 OMP = [ ocaml-migrate-parsetree-2 ]; 54 }; 55 "0.22.0" = { 56 sha256 = "sha256-PuuR4DlmZiKEoyIuYS3uf0+it2N8U9lXLSp0E0u5bXo="; 57 min_version = "4.07"; 58 max_version = "4.13"; 59 OMP = [ ocaml-migrate-parsetree-2 ]; 60 }; 61 "0.22.2" = { 62 sha256 = "sha256-0Oih69xiILFXTXqSbwCEYMURjM73m/mgzgJC80z/Ilo="; 63 min_version = "4.07"; 64 max_version = "4.14"; 65 OMP = [ ocaml-migrate-parsetree-2 ]; 66 }; 67 "0.23.0" = { 68 sha256 = "sha256-G1g2wYa51aFqz0falPOWj08ItRm3cpzYao/TmXH+EuU="; 69 min_version = "4.07"; 70 max_version = "4.14"; 71 }; 72 "0.24.0" = { 73 sha256 = "sha256-d2YCfC7ND1s7Rg6SEqcHCcZ0QngRPrkfMXxWxB56kMg="; 74 min_version = "4.07"; 75 max_version = "5.1"; 76 }; 77 "0.28.0" = { 78 sha256 = "sha256-2Hrl+aCBIGMIypZICbUKZq646D0lSAHouWdUSLYM83c="; 79 min_version = "4.07"; 80 max_version = "5.1"; 81 }; 82 "0.30.0" = { 83 sha256 = "sha256-3UpjvenSm0mBDgTXZTk3yTLxd6lByg4ZgratU6xEIRA="; 84 min_version = "4.07"; 85 }; 86 "0.32.1" = { 87 sha256 = "sha256-nbrYvLHItPPfP1i8pgpe0j2GUx8No0tBlshr1YXAnX8="; 88 min_version = "4.07"; 89 }; 90 "0.33.0" = { 91 sha256 = "sha256-/6RO9VHyO3XiHb1pijAxBDE4Gq8UC5/kuBwucKLSxjo="; 92 min_version = "4.07"; 93 }; 94 "0.34.0" = { 95 sha256 = "sha256-132XFloVjXrla3wDh80E6ZJ9fn55fKEDn/tbsXpmYac="; 96 }; 97 "0.36.2" = { 98 sha256 = "sha256-yHVgB9jKwTeahGEUYQDB1hHH327MGpoKqb3ewNbk5xs="; 99 min_version = "4.08"; 100 }; 101 "0.37.0" = { 102 sha256 = "sha256-LiI4N+fOzDvISkMkMsCnL04dW+kWXJwzdy8VbbhdsLM="; 103 min_version = "4.08"; 104 }; 105 } 106 ."${version}"; 107in 108 109buildDunePackage rec { 110 pname = "ppxlib"; 111 inherit version; 112 113 src = fetchurl { 114 url = "https://github.com/ocaml-ppx/ppxlib/releases/download/${version}/ppxlib-${version}.tbz"; 115 inherit (param) sha256; 116 }; 117 118 propagatedBuildInputs = [ 119 ocaml-compiler-libs 120 ] 121 ++ (param.OMP or [ ]) 122 ++ [ 123 ppx_derivers 124 stdio 125 stdlib-shims 126 ]; 127 128 meta = { 129 description = "Comprehensive ppx tool set"; 130 license = lib.licenses.mit; 131 maintainers = [ lib.maintainers.vbgl ]; 132 homepage = "https://github.com/ocaml-ppx/ppxlib"; 133 broken = 134 param ? max_version && lib.versionAtLeast ocaml.version param.max_version 135 || param ? min_version && lib.versionOlder ocaml.version param.min_version; 136 }; 137}