diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/ocaml-modules/nocrypto | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/nocrypto')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix b/nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix new file mode 100644 index 000000000000..813b4d7f7a4a --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, topkg +, cpuid, ocb-stubblr +, cstruct, zarith, ppx_sexp_conv +, cstruct-lwt ? null +}: + +with stdenv.lib; +let withLwt = cstruct-lwt != null; in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-nocrypto-${version}"; + version = "0.5.4"; + + src = fetchurl { + url = "https://github.com/mirleft/ocaml-nocrypto/releases/download/v${version}/nocrypto-${version}.tbz"; + sha256 = "0zshi9hlhcz61n5z1k6fx6rsi0pl4xgahsyl2jp0crqkaf3hqwlg"; + }; + + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0001-add-missing-runtime-dependencies-in-_tags.patch"; + sha256 = "1asybwj3rl07b4q4cxwy80a7j17j0i5vzz77p38hymilhc2ky7xn"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch"; + sha256 = "0zmp64n5fgkawpkyw0vv0bg0i2c3xbsxqy17vwy92nf5rbardi1r"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0003-Auto-detect-ppx_sexp_conv-runtime-library.patch"; + sha256 = "0lngbg5gyd5gs56lbjh6g86cps1y8x1xsqzi0vi1v28al1gn5dhw"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0004-pack-package-workaround-ocamlbuild-272.patch"; + sha256 = "16k0w78plvqhl17qiqq1mckxhhcdysqgs94l54a1bn0l6fx3rvb9"; + }) + ]; + + buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr ]; + propagatedBuildInputs = [ cstruct ppx_sexp_conv zarith ] ++ optional withLwt cstruct-lwt; + + buildPhase = "${topkg.buildPhase} --with-lwt ${boolToString withLwt}"; + inherit (topkg) installPhase; + + meta = { + homepage = https://github.com/mirleft/ocaml-nocrypto; + description = "Simplest possible crypto to support TLS"; + license = stdenv.lib.licenses.bsd2; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} |