From 9189f0318de7242116865efe65ffb03a7a39bf69 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Wed, 21 May 2025 20:27:02 -0400 Subject: [PATCH] ocamlPackages.decoders: init at 1.0.0 Since all decoders-* packages are part of the base decoders package source, and the versions are all tied together, they are added as a single commit (cherry picked from commit 5416aaae9d88f3676ea17f67e6b10b5bfcf434db) --- .../decoders-bencode/default.nix | 36 ++++++++++++++++++ .../ocaml-modules/decoders-cbor/default.nix | 36 ++++++++++++++++++ .../decoders-ezjsonm/default.nix | 36 ++++++++++++++++++ .../ocaml-modules/decoders-ezxmlm/default.nix | 34 +++++++++++++++++ .../ocaml-modules/decoders-jsonaf/default.nix | 36 ++++++++++++++++++ .../ocaml-modules/decoders-jsonm/default.nix | 36 ++++++++++++++++++ .../ocaml-modules/decoders-msgpck/default.nix | 36 ++++++++++++++++++ .../decoders-sexplib/default.nix | 38 +++++++++++++++++++ .../ocaml-modules/decoders-yojson/default.nix | 36 ++++++++++++++++++ .../ocaml-modules/decoders/default.nix | 31 +++++++++++++++ pkgs/top-level/ocaml-packages.nix | 20 ++++++++++ 11 files changed, 375 insertions(+) create mode 100644 pkgs/development/ocaml-modules/decoders-bencode/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-cbor/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-ezjsonm/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-ezxmlm/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-jsonaf/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-jsonm/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-msgpck/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-sexplib/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders-yojson/default.nix create mode 100644 pkgs/development/ocaml-modules/decoders/default.nix diff --git a/pkgs/development/ocaml-modules/decoders-bencode/default.nix b/pkgs/development/ocaml-modules/decoders-bencode/default.nix new file mode 100644 index 000000000000..6e2198ff2b6d --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-bencode/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + bencode, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-bencode"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + bencode + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "Bencode backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-cbor/default.nix b/pkgs/development/ocaml-modules/decoders-cbor/default.nix new file mode 100644 index 000000000000..067beb013cb2 --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-cbor/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + cbor, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-cbor"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + cbor + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "CBOR backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-ezjsonm/default.nix b/pkgs/development/ocaml-modules/decoders-ezjsonm/default.nix new file mode 100644 index 000000000000..acb5c16cffa7 --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-ezjsonm/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + ezjsonm, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-ezjsonm"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + ezjsonm + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "Ezjsonm backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-ezxmlm/default.nix b/pkgs/development/ocaml-modules/decoders-ezxmlm/default.nix new file mode 100644 index 000000000000..685265dddff1 --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-ezxmlm/default.nix @@ -0,0 +1,34 @@ +{ + lib, + buildDunePackage, + decoders, + ezxmlm, + containers, +}: + +buildDunePackage rec { + pname = "decoders-ezxmlm"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + ezxmlm + ]; + + doCheck = true; + checkInputs = [ + containers + ]; + + meta = { + description = "Ezxmlm backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-jsonaf/default.nix b/pkgs/development/ocaml-modules/decoders-jsonaf/default.nix new file mode 100644 index 000000000000..d6e01a3273c5 --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-jsonaf/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + jsonaf ? null, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-jsonaf"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.11.0"; + + propagatedBuildInputs = [ + decoders + jsonaf + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "Jsonaf backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-jsonm/default.nix b/pkgs/development/ocaml-modules/decoders-jsonm/default.nix new file mode 100644 index 000000000000..c354ae20d076 --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-jsonm/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + jsonm, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-jsonm"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + jsonm + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "Jsonm backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-msgpck/default.nix b/pkgs/development/ocaml-modules/decoders-msgpck/default.nix new file mode 100644 index 000000000000..6004a2503aac --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-msgpck/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + msgpck, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-msgpck"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + msgpck + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "Msgpck backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-sexplib/default.nix b/pkgs/development/ocaml-modules/decoders-sexplib/default.nix new file mode 100644 index 000000000000..5b12b422fded --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-sexplib/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildDunePackage, + decoders, + sexplib, + sexplib0, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-sexplib"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + sexplib + sexplib0 + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "sexplib backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders-yojson/default.nix b/pkgs/development/ocaml-modules/decoders-yojson/default.nix new file mode 100644 index 000000000000..8da0e05a69ff --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders-yojson/default.nix @@ -0,0 +1,36 @@ +{ + lib, + buildDunePackage, + decoders, + yojson, + containers, + ounit2, +}: + +buildDunePackage rec { + pname = "decoders-yojson"; + + # sub-package built separately from the same source + inherit (decoders) src version; + + minimalOCamlVersion = "4.03.0"; + + propagatedBuildInputs = [ + decoders + yojson + ]; + + doCheck = true; + checkInputs = [ + containers + ounit2 + ]; + + meta = { + description = "Yojson backend for decoders"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/development/ocaml-modules/decoders/default.nix b/pkgs/development/ocaml-modules/decoders/default.nix new file mode 100644 index 000000000000..42e68503ac8d --- /dev/null +++ b/pkgs/development/ocaml-modules/decoders/default.nix @@ -0,0 +1,31 @@ +{ + lib, + buildDunePackage, + fetchurl, + containers, +}: + +buildDunePackage rec { + pname = "decoders"; + version = "1.0.0"; + + minimalOCamlVersion = "4.03.0"; + + src = fetchurl { + url = "https://github.com/mattjbray/ocaml-decoders/releases/download/v${version}/${pname}-${version}.tbz"; + hash = "sha256-R/55xBAtD3EO/zzq7zExANnfPHlFg00884o5dCpXNZc="; + }; + + doCheck = true; + checkInputs = [ + containers + ]; + + meta = { + description = "Elm-inspired decoders for Ocaml"; + homepage = "https://github.com/mattjbray/ocaml-decoders"; + changelog = "https://github.com/mattjbray/ocaml-decoders/blob/${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ infinidoge ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 5767b891fd49..00bc16314969 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -330,6 +330,26 @@ let dbf = callPackage ../development/ocaml-modules/dbf { }; + decoders = callPackage ../development/ocaml-modules/decoders { }; + + decoders-bencode = callPackage ../development/ocaml-modules/decoders-bencode { }; + + decoders-cbor = callPackage ../development/ocaml-modules/decoders-cbor { }; + + decoders-ezjsonm = callPackage ../development/ocaml-modules/decoders-ezjsonm { }; + + decoders-ezxmlm = callPackage ../development/ocaml-modules/decoders-ezxmlm { }; + + decoders-jsonaf = callPackage ../development/ocaml-modules/decoders-jsonaf { }; + + decoders-jsonm = callPackage ../development/ocaml-modules/decoders-jsonm { }; + + decoders-msgpck = callPackage ../development/ocaml-modules/decoders-msgpck { }; + + decoders-sexplib = callPackage ../development/ocaml-modules/decoders-sexplib { }; + + decoders-yojson = callPackage ../development/ocaml-modules/decoders-yojson { }; + decompress = callPackage ../development/ocaml-modules/decompress { }; dedukti = callPackage ../development/ocaml-modules/dedukti { };