From 993fe6176af28eb0e0fa0c10f4fa4cfb353ea4f8 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Tue, 21 Sep 2021 08:43:13 +0000 Subject: [PATCH] ocamlPackages.tar: init at 1.1.0 --- .../development/ocaml-modules/tar/default.nix | 39 +++++++++++++++++++ pkgs/development/ocaml-modules/tar/unix.nix | 27 +++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++ 3 files changed, 70 insertions(+) create mode 100644 pkgs/development/ocaml-modules/tar/default.nix create mode 100644 pkgs/development/ocaml-modules/tar/unix.nix diff --git a/pkgs/development/ocaml-modules/tar/default.nix b/pkgs/development/ocaml-modules/tar/default.nix new file mode 100644 index 00000000000..abc28e2d879 --- /dev/null +++ b/pkgs/development/ocaml-modules/tar/default.nix @@ -0,0 +1,39 @@ +{ lib +, fetchFromGitHub +, buildDunePackage +, ppx_cstruct +, cstruct +, re +, ppx_tools +}: + +buildDunePackage rec { + pname = "tar"; + version = "1.1.0"; + src = fetchFromGitHub { + owner = "mirage"; + repo = "ocaml-tar"; + rev = "v${version}"; + sha256 = "14k24vn3q5jl0iyrynb5vwg80670qsv12fsmc6cdgh4zwdpjh7zs"; + }; + + useDune2 = true; + + propagatedBuildInputs = [ + ppx_cstruct + cstruct + re + ]; + + buildInputs = [ + ppx_tools + ]; + + doCheck = true; + + meta = { + description = "Decode and encode tar format files from Unix"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} diff --git a/pkgs/development/ocaml-modules/tar/unix.nix b/pkgs/development/ocaml-modules/tar/unix.nix new file mode 100644 index 00000000000..4ac1f625a02 --- /dev/null +++ b/pkgs/development/ocaml-modules/tar/unix.nix @@ -0,0 +1,27 @@ +{ lib +, buildDunePackage +, tar +, cstruct +, cstruct-lwt +, re +, lwt +}: + +buildDunePackage rec { + pname = "tar-unix"; + inherit (tar) version src useDune2 doCheck; + + propagatedBuildInputs = [ + tar + cstruct + cstruct-lwt + re + lwt + ]; + + meta = { + description = "Decode and encode tar format files from Unix"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 44de4ed9aea..9b5c24f6b70 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1074,6 +1074,10 @@ let spacetime_lib = callPackage ../development/ocaml-modules/spacetime_lib { }; + tar-unix = callPackage ../development/ocaml-modules/tar/unix.nix { }; + + tar = callPackage ../development/ocaml-modules/tar { }; + tcpip = callPackage ../development/ocaml-modules/tcpip { }; tsort = callPackage ../development/ocaml-modules/tsort { };