Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 25 lines 729 B view raw
1{ lib, stdenv, fetchFromGitHub, opam-installer, ocamlPackages }: 2stdenv.mkDerivation rec { 3 pname = "opam2json"; 4 version = "0.4"; 5 6 src = fetchFromGitHub { 7 owner = "tweag"; 8 repo = pname; 9 rev = "v${version}"; 10 sha256 = "sha256-5pXfbUfpVABtKbii6aaI2EdAZTjHJ2QntEf0QD2O5AM="; 11 }; 12 13 buildInputs = with ocamlPackages; [ yojson opam-file-format cmdliner ]; 14 nativeBuildInputs = with ocamlPackages; [ ocaml findlib opam-installer ]; 15 16 preInstall = ''export PREFIX="$out"''; 17 18 meta = with lib; { 19 platforms = platforms.all; 20 description = "convert opam file syntax to JSON"; 21 maintainers = [ maintainers.balsoft ]; 22 license = licenses.gpl3; 23 homepage = "https://github.com/tweag/opam2json"; 24 }; 25}