Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2a84a4981d32
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 18370bce2f70
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 27, 2020

  1. Unverified

    The signing certificate or its chain could not be verified.
    Copy the full SHA
    2044e44 View commit details
  2. Copy the full SHA
    18370bc View commit details
Showing with 18 additions and 22 deletions.
  1. +12 −20 pkgs/development/ocaml-modules/ocaml-protoc/default.nix
  2. +6 −2 pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix
32 changes: 12 additions & 20 deletions pkgs/development/ocaml-modules/ocaml-protoc/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
{ stdenv, ocaml, fetchFromGitHub, ocamlbuild, findlib, ppx_deriving_protobuf }:
{ lib, fetchFromGitHub, buildDunePackage
, stdlib-shims
}:

stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-ocaml-protoc-${version}";
version = "1.2.0";
buildDunePackage rec {
pname = "ocaml-protoc";
version = "2.0.2";

useDune2 = true;

minimumOCamlVersion = "4.02";

src = fetchFromGitHub {
owner = "mransan";
repo = "ocaml-protoc";
rev = "60d2d4dd55f73830e1bed603cc44d3420430632c";
sha256 = "1d1p8ch723z2qa9azmmnhbcpwxbpzk3imh1cgkjjq4p5jwzj8amj";
rev = version;
sha256 = "1vlnjqqpypmjhlyrxfzla79y4ilmc9ggz311giy6vmh4cyzl29h3";
};

installPhase = ''
mkdir -p tmp/bin
export PREFIX=`pwd`/tmp
make all.install.build
make check_install
make lib.install
make bin.install
'';

buildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ ppx_deriving_protobuf ];

createFindlibDestdir = true;
buildInputs = [ stdlib-shims ];

doCheck = true;

meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/mransan/ocaml-protoc";
description = "A Protobuf Compiler for OCaml";
license = licenses.mit;
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{ stdenv, fetchFromGitHub, buildDunePackage, cppo, ppx_tools, ppx_deriving
{ lib, fetchFromGitHub, buildDunePackage, ocaml, cppo, ppx_tools, ppx_deriving
, ppxfind }:

if lib.versionAtLeast ocaml.version "4.11"
then throw "ppx_deriving_protobuf is not available for OCaml ${ocaml.version}"
else

buildDunePackage rec {
pname = "ppx_deriving_protobuf";
version = "2.7";
@@ -14,7 +18,7 @@ buildDunePackage rec {

buildInputs = [ cppo ppx_tools ppxfind ppx_deriving ];

meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/ocaml-ppx/ppx_deriving_protobuf";
description = "A Protocol Buffers codec generator for OCaml";
license = licenses.mit;