about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/ocaml/opam2json/default.nix
blob: a3ca535d3f86f25f2bf32e3253667e7925d7c2b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ lib, stdenv, fetchFromGitHub, opam-installer, ocamlPackages }:
stdenv.mkDerivation rec {
  pname = "opam2json";
  version = "0.4";

  src = fetchFromGitHub {
    owner = "tweag";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-5pXfbUfpVABtKbii6aaI2EdAZTjHJ2QntEf0QD2O5AM=";
  };

  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";
  };
}