diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-09-08 00:46:04 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-09-16 22:13:21 +0000 |
commit | afcf2d55332c5c01c2d989e9d010577d257cb6cc (patch) | |
tree | e1c816a271686b014a6403bcad7c57dd2ee4d9c7 /nixpkgs/pkgs/development/ocaml-modules/cstruct | |
parent | 175b9acd282aaf65b5f354ea6e95c1348fe3daa3 (diff) | |
parent | 4e60699fa727e4a0f9a3e78948012f86da32cfef (diff) | |
download | nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.gz nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.bz2 nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.lz nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.xz nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.zst nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.zip |
Merge commit '4e60699fa727e4a0f9a3e78948012f86da32cfef'
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/cstruct')
4 files changed, 26 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix index 37c7f660ca6b..01a32fc09a20 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix @@ -1,20 +1,18 @@ -{ stdenv, fetchurl, buildDunePackage, sexplib, ocplib-endian }: +{ lib, fetchurl, buildDunePackage }: buildDunePackage rec { pname = "cstruct"; - version = "3.1.1"; + version = "4.0.0"; src = fetchurl { - url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-${version}.tbz"; - sha256 = "1x4jxsvd1lrfibnjdjrkfl7hqsc48rljnwbap6faanj9qhwwa6v2"; + url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz"; + sha256 = "1q4fsc2m6d96yf42g3wb3gcnhpnxw800df5mh3yr25pprj8y4m1a"; }; - propagatedBuildInputs = [ sexplib ocplib-endian ]; - meta = { description = "Access C-like structures directly from OCaml"; - license = stdenv.lib.licenses.isc; + license = lib.licenses.isc; homepage = "https://github.com/mirage/ocaml-cstruct"; - maintainers = [ stdenv.lib.maintainers.vbgl ]; + maintainers = [ lib.maintainers.vbgl ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix index 78600b783068..b5c39533e733 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, cstruct, ppx_tools_versioned }: +{ lib, buildDunePackage, cstruct, sexplib, ppx_tools_versioned }: if !lib.versionAtLeast (cstruct.version or "1") "3" then cstruct @@ -8,8 +8,8 @@ buildDunePackage { pname = "ppx_cstruct"; inherit (cstruct) version src meta; - minimumOCamlVersion = "4.02"; + minimumOCamlVersion = "4.03"; - buildInputs = [ ppx_tools_versioned ]; + buildInputs = [ sexplib ppx_tools_versioned ]; propagatedBuildInputs = [ cstruct ]; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix new file mode 100644 index 000000000000..9a1ef0dd301f --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix @@ -0,0 +1,16 @@ +{ lib, buildDunePackage, alcotest, cstruct, sexplib }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else + +buildDunePackage { + pname = "cstruct-sexp"; + inherit (cstruct) version src meta; + + doCheck = true; + buildInputs = [ alcotest ]; + + propagatedBuildInputs = [ cstruct sexplib ]; +} + diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix index 604ad4fb083b..7cb5d6658696 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix @@ -8,7 +8,7 @@ buildDunePackage { pname = "cstruct-unix"; inherit (cstruct) version src meta; - minimumOCamlVersion = "4.02"; + minimumOCamlVersion = "4.06"; propagatedBuildInputs = [ cstruct ]; } |