about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/nocrypto
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-11-04 12:24:57 +0100
committerProfpatsch <mail@profpatsch.de>2016-11-04 12:24:57 +0100
commit2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213 (patch)
tree947e0194e8689d45eb9d83aaa27c3471bcbfd350 /pkgs/development/ocaml-modules/nocrypto
parentc5cac5051af83b41c3601e7e7116f7b49c8dd010 (diff)
downloadnixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.tar
nixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.tar.gz
nixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.tar.bz2
nixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.tar.lz
nixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.tar.xz
nixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.tar.zst
nixlib-2bd86e9e47d82acf296b353e2bd6b5cb6b7ba213.zip
Revert "Merge pull request #20090 from sternenseemann/master"
Reason: https://github.com/NixOS/nixpkgs/pull/20090#commitcomment-19686426

This reverts commit 9ffcb1b2503303bfdb4a8fc31c8e4160184eb74c, reversing
changes made to a6283c1126676d30de3abfb3ee8865505da0ed43.
Diffstat (limited to 'pkgs/development/ocaml-modules/nocrypto')
-rw-r--r--pkgs/development/ocaml-modules/nocrypto/default.nix33
1 files changed, 12 insertions, 21 deletions
diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix
index b56d04b062c0..f8db935b6122 100644
--- a/pkgs/development/ocaml-modules/nocrypto/default.nix
+++ b/pkgs/development/ocaml-modules/nocrypto/default.nix
@@ -1,30 +1,20 @@
-{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, type_conv, zarith, ounit, ocaml_oasis, ppx_sexp_conv
-, lwt     ? null
-, withLwt ? true}:
+{ stdenv, fetchzip, ocaml, findlib, cstruct, type_conv, zarith, ounit }:
 
-with stdenv.lib;
-assert withLwt -> lwt != null;
+assert stdenv.lib.versionAtLeast ocaml.version "4.01";
 
-buildOcaml rec {
-  name = "nocrypto";
-  version = "0.5.3";
+stdenv.mkDerivation rec {
+  name = "ocaml-nocrypto-${version}";
+  version = "0.5.1";
 
-  minimumSupportedOcamlVersion = "4.02";
-
-  src = fetchFromGitHub {
-    owner  = "mirleft";
-    repo   = "ocaml-nocrypto";
-    rev    = "v${version}";
-    sha256 = "0m3yvqpgfffqp15mcl08b78cv8zw25rnp6z1pkj5aimz6xg3gqbl";
+  src = fetchzip {
+    url = "https://github.com/mirleft/ocaml-nocrypto/archive/${version}.tar.gz";
+    sha256 = "15gffvixk12ghsfra9amfszd473c8h188zfj03ngvblbdm0d80m0";
   };
 
-  buildInputs = [ ocaml ocaml_oasis findlib type_conv ounit ppx_sexp_conv ];
-  propagatedBuildInputs = [ cstruct zarith ] ++ optional withLwt lwt;
-
-  configureFlags = [ "--enable-tests" ] ++ optional withLwt ["--enable-lwt"];
-
-  configurePhase = "./configure --prefix $out $configureFlags";
+  buildInputs = [ ocaml findlib type_conv ounit ];
+  propagatedBuildInputs = [ cstruct zarith ];
 
+  configureFlags = "--enable-tests";
   doCheck = true;
   checkTarget = "test";
   createFindlibDestdir = true;
@@ -32,6 +22,7 @@ buildOcaml rec {
   meta = {
     homepage = https://github.com/mirleft/ocaml-nocrypto;
     description = "Simplest possible crypto to support TLS";
+    platforms = ocaml.meta.platforms or [];
     license = stdenv.lib.licenses.bsd2;
     maintainers = with stdenv.lib.maintainers; [ vbgl ];
   };