summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAlexander Bantyev <balsoft@balsoft.ru>2022-07-18 12:08:49 +0400
committerGitHub <noreply@github.com>2022-07-18 12:08:49 +0400
commit726e0661d0e4adf3f9e9c3b057709399c300fea8 (patch)
treea1f0763fa8768bdf9ec977b51d7523488455eaab /pkgs
parent4e0f8f7f446a57f3e0281bba50d685bc309753c7 (diff)
parentfcd75613ea1f8ae73ad6c0f70b18197584a94e2e (diff)
downloadnixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.tar
nixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.tar.gz
nixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.tar.bz2
nixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.tar.lz
nixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.tar.xz
nixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.tar.zst
nixpkgs-726e0661d0e4adf3f9e9c3b057709399c300fea8.zip
Merge pull request #181758 from NixOS/balsoft/opam2json
opam2json: init at v0.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/ocaml/opam2json/default.nix25
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/opam2json/default.nix b/pkgs/development/tools/ocaml/opam2json/default.nix
new file mode 100644
index 00000000000..198a5f575eb
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam2json/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, opam-installer, ocamlPackages }:
+stdenv.mkDerivation rec {
+  pname = "opam2json";
+  version = "0.2";
+
+  src = fetchFromGitHub {
+    owner = "tweag";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "fe8bm/V/4r2iNxgbitT2sXBqDHQ0GBSnSUSBg/1aXoI=";
+  };
+
+  buildInputs = with ocamlPackages; [ yojson opam-file-format cmdliner ];
+  nativeBuildInputs = with ocamlPackages; [ ocaml findlib opam-installer ];
+
+  preInstall = ''export PREFIX="$out"'';
+
+  meta = with lib; {
+    platforms = platforms.all;
+    description = "convert opam file syntax to JSON";
+    maintainers = [ maintainers.balsoft ];
+    license = licenses.gpl3;
+    homepage = "https://github.com/tweag/opam2json";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 759067e98c0..73e62da2610 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13946,6 +13946,8 @@ with pkgs;
 
   opam-installer = callPackage ../development/tools/ocaml/opam/installer.nix { };
 
+  opam2json = callPackage ../development/tools/ocaml/opam2json { };
+
   wrapWatcom = callPackage ../development/compilers/open-watcom/wrapper.nix { };
   open-watcom-v2-unwrapped = callPackage ../development/compilers/open-watcom/v2.nix { };
   open-watcom-v2 = wrapWatcom open-watcom-v2-unwrapped { };