diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-11-05 11:21:46 +0100 |
---|---|---|
committer | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-11-07 10:08:03 +0100 |
commit | 794158fcd54b862f3775bc8b54495a842a250b7b (patch) | |
tree | 333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/linenoise | |
parent | 5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff) |
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/linenoise')
-rw-r--r-- | pkgs/development/ocaml-modules/linenoise/default.nix | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/linenoise/default.nix b/pkgs/development/ocaml-modules/linenoise/default.nix index e7120ad385727..b6b9b4163ff94 100644 --- a/pkgs/development/ocaml-modules/linenoise/default.nix +++ b/pkgs/development/ocaml-modules/linenoise/default.nix @@ -1,29 +1,24 @@ -{ stdenv, fetchFromGitHub, ocaml, dune, findlib, result }: +{ stdenv, fetchFromGitHub, buildDunePackage, result }: -if !stdenv.lib.versionAtLeast ocaml.version "4.02" -then throw "linenoise is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-linenoise-${version}"; +buildDunePackage rec { + pname = "linenoise"; version = "1.1.0"; + + minimumOCamlVersion = "4.02"; + src = fetchFromGitHub { owner = "fxfactorial"; - repo = "ocaml-linenoise"; + repo = "ocaml-${pname}"; rev = "v${version}"; sha256 = "1h6rqfgmhmd7p5z8yhk6zkbrk4yzw1v2fgwas2b7g3hqs6y0xj0q"; }; - buildInputs = [ ocaml findlib dune ]; propagatedBuildInputs = [ result ]; - inherit (dune) installPhase; - meta = { description = "OCaml bindings to linenoise"; license = stdenv.lib.licenses.bsd3; maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; inherit (src.meta) homepage; }; } |