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: 924e5cdc556f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 90bc1492ca61
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 15, 2020

  1. Copy the full SHA
    90bc149 View commit details
Showing with 14 additions and 32 deletions.
  1. +14 −32 pkgs/development/ocaml-modules/asn1-combinators/default.nix
46 changes: 14 additions & 32 deletions pkgs/development/ocaml-modules/asn1-combinators/default.nix
Original file line number Diff line number Diff line change
@@ -1,45 +1,27 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild
, cstruct, zarith, ounit, result, topkg, ptime
{ lib, buildDunePackage, fetchurl
, cstruct, zarith, bigarray-compat, stdlib-shims, ptime, alcotest
}:

let param =
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
version = "0.2.0";
sha256 = "0yfq4hnyzx6hy05m60007cfpq88wxwa8wqzib19lnk2qrgy772mx";
propagatedBuildInputs = [ ptime ];
} else {
version = "0.1.3";
sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj";
propagatedBuildInputs = [ ];
};
in
buildDunePackage rec {
minimumOCamlVersion = "4.05";

stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-asn1-combinators-${version}";
inherit (param) version;
pname = "asn1-combinators";
version = "0.2.2";

src = fetchFromGitHub {
owner = "mirleft";
repo = "ocaml-asn1-combinators";
rev = "v${version}";
inherit (param) sha256;
src = fetchurl {
url = "https://github.com/mirleft/ocaml-asn1-combinators/releases/download/v${version}/asn1-combinators-v${version}.tbz";
sha256 = "0c9n3nki3drjwn7yv2pg7nzyzsi409laq70830wh147hvvwxbsy9";
};

buildInputs = [ findlib ounit topkg ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs;

buildPhase = "${topkg.run} build --tests true";

inherit (topkg) installPhase;
propagatedBuildInputs = [ cstruct zarith bigarray-compat stdlib-shims ptime ];

doCheck = true;
checkPhase = "${topkg.run} test";
checkInputs = [ alcotest ];

meta = {
meta = with lib; {
homepage = "https://github.com/mirleft/ocaml-asn1-combinators";
description = "Combinators for expressing ASN.1 grammars in OCaml";
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
license = licenses.isc;
maintainers = with maintainers; [ vbgl ];
};
}