summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/cryptokit
diff options
context:
space:
mode:
authorKirill Boltaev <aske@fmap.me>2016-10-05 11:32:30 +0400
committervbgl <vbgl@users.noreply.github.com>2016-10-05 09:32:30 +0200
commit3e646865f4eb5216117dc49f3c9fb4a02ad2313b (patch)
tree9418314db159ba326550bf4af9df1e7aa9a75332 /pkgs/development/ocaml-modules/cryptokit
parent916364af72f15e7635387889d883b605948b1f1d (diff)
downloadnixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.tar
nixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.tar.gz
nixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.tar.bz2
nixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.tar.lz
nixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.tar.xz
nixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.tar.zst
nixpkgs-3e646865f4eb5216117dc49f3c9fb4a02ad2313b.zip
treewide: use ocaml.version (#19192)
Diffstat (limited to 'pkgs/development/ocaml-modules/cryptokit')
-rw-r--r--pkgs/development/ocaml-modules/cryptokit/default.nix13
1 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/cryptokit/default.nix b/pkgs/development/ocaml-modules/cryptokit/default.nix
index a2cf545e84c..be61ad70b3d 100644
--- a/pkgs/development/ocaml-modules/cryptokit/default.nix
+++ b/pkgs/development/ocaml-modules/cryptokit/default.nix
@@ -1,13 +1,10 @@
 {stdenv, fetchurl, zlib, ocaml, findlib, ncurses}:
 
-let
-  ocaml_version = (builtins.parseDrvName ocaml.name).version;
-in
+assert stdenv.lib.versionAtLeast ocaml.version "3.12";
 
-assert stdenv.lib.versionAtLeast ocaml_version "3.12";
-
-stdenv.mkDerivation {
-  name = "cryptokit-1.10";
+stdenv.mkDerivation rec {
+  name = "cryptokit-${version}";
+  version = "1.10";
 
   src = fetchurl {
     url = http://forge.ocamlcore.org/frs/download.php/1493/cryptokit-1.10.tar.gz;
@@ -18,7 +15,7 @@ stdenv.mkDerivation {
 
   buildFlags = "setup.data build";
 
-  preBuild = "mkdir -p $out/lib/ocaml/${ocaml_version}/site-lib/cryptokit";
+  preBuild = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/cryptokit";
 
   meta = {
     homepage = "http://pauillac.inria.fr/~xleroy/software.html";