nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 65 lines 1.3 kB view raw
1{ 2 lib, 3 ocaml, 4 fetchFromGitHub, 5 buildDunePackage, 6 bigarray-compat, 7 containers, 8 cppo, 9 ctypes, 10 integers, 11 num, 12 ppxlib, 13 re, 14 findlib, 15}: 16 17buildDunePackage rec { 18 pname = "ppx_cstubs"; 19 version = "0.7.0"; 20 21 env = 22 # Fix build with gcc15 23 lib.optionalAttrs 24 ( 25 lib.versionAtLeast ocaml.version "4.10" && lib.versionOlder ocaml.version "4.14" 26 || lib.versions.majorMinor ocaml.version == "5.0" 27 ) 28 { 29 NIX_CFLAGS_COMPILE = "-std=gnu11"; 30 }; 31 32 src = fetchFromGitHub { 33 owner = "fdopen"; 34 repo = "ppx_cstubs"; 35 rev = version; 36 hash = "sha256-qMmwRWCIfNyhCQYPKLiufnb57sTR3P+WInOqtPDywFs="; 37 }; 38 39 patches = [ ./ppxlib.patch ]; 40 41 nativeBuildInputs = [ cppo ]; 42 43 buildInputs = [ 44 bigarray-compat 45 containers 46 findlib 47 integers 48 num 49 ppxlib 50 re 51 ]; 52 53 propagatedBuildInputs = [ 54 ctypes 55 ]; 56 57 meta = { 58 homepage = "https://github.com/fdopen/ppx_cstubs"; 59 changelog = "https://github.com/fdopen/ppx_cstubs/raw/${version}/CHANGES.md"; 60 description = "Preprocessor for easier stub generation with ocaml-ctypes"; 61 license = lib.licenses.lgpl21Plus; 62 maintainers = [ lib.maintainers.osener ]; 63 broken = lib.versionAtLeast ocaml.version "5.2"; 64 }; 65}