-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build vlq with buildDunePackage and dune2
- Loading branch information
Showing
2 changed files
with
8 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
{ stdenv, fetchFromGitHub, ocaml, findlib, dune_1 }: | ||
{ buildDunePackage, fetchFromGitHub }: | ||
|
||
let version = "v0.2.0"; in | ||
stdenv.mkDerivation { | ||
name = "ocaml${ocaml.version}-vlq-${version}"; | ||
buildDunePackage { | ||
pname = "vlq"; | ||
inherit version; | ||
|
||
useDune2 = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "flowtype"; | ||
repo = "ocaml-vlq"; | ||
rev = version; | ||
sha256 = "09jdgih2n2qwpxnlbcca4xa193rwbd1nw7prxaqlg134l4mbya83"; | ||
}; | ||
|
||
buildInputs = [ ocaml findlib dune_1 ]; | ||
|
||
buildPhase = "dune build"; | ||
|
||
installPhase = "dune install --prefix $out --libdir $OCAMLFIND_DESTDIR vlq"; | ||
|
||
meta = { | ||
homepage = https://github.com/flowtype/ocaml-vlq; | ||
platforms = ocaml.meta.platforms or []; | ||
description = "A simple library for encoding variable-length quantities"; | ||
}; | ||
} |