nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 ocaml,
5 buildDunePackage,
6 fetchFromGitHub,
7 menhir,
8 menhirLib,
9}:
10
11buildDunePackage rec {
12 pname = "zelus";
13 version = "2.2";
14
15 env =
16 # Fix build with gcc15
17 lib.optionalAttrs
18 (
19 lib.versionAtLeast ocaml.version "4.10" && lib.versionOlder ocaml.version "4.14"
20 || lib.versions.majorMinor ocaml.version == "5.0"
21 )
22 {
23 NIX_CFLAGS_COMPILE = "-std=gnu11";
24 };
25
26 src = fetchFromGitHub {
27 owner = "INRIA";
28 repo = "zelus";
29 rev = version;
30 hash = "sha256-NcGX343LProADtzJwlq1kmihLaya1giY6xv9ScvdgTA=";
31 };
32
33 # ./configure: cannot execute: required file not found
34 postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
35 patchShebangs configure
36 '';
37
38 nativeBuildInputs = [
39 menhir
40 ];
41
42 buildInputs = [
43 menhirLib
44 ];
45
46 meta = {
47 description = "Synchronous language with ODEs";
48 homepage = "https://zelus.di.ens.fr";
49 license = lib.licenses.inria-zelus;
50 mainProgram = "zeluc";
51 maintainers = with lib.maintainers; [ wegank ];
52 };
53}