summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2021-10-30 22:51:50 +0200
committerFelix Buehler <account@buehler.rocks>2021-12-08 12:47:49 +0100
commit2c8b542e2c5f913daace604f03e1ff8eeffa09d5 (patch)
tree1e99cfb792ec0815d7b6e8f22f342e1d67bde9e5 /pkgs/development/ocaml-modules
parentb5bb0514ea8f99a20100fc5bfd0b1054463edad4 (diff)
downloadnixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.tar
nixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.tar.gz
nixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.tar.bz2
nixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.tar.lz
nixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.tar.xz
nixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.tar.zst
nixpkgs-2c8b542e2c5f913daace604f03e1ff8eeffa09d5.zip
ocamlPackages.ctypes: switch to fetchFromGitHub
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/ctypes/default.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix
index f8ccffcf217..8c20a68c274 100644
--- a/pkgs/development/ocaml-modules/ctypes/default.nix
+++ b/pkgs/development/ocaml-modules/ctypes/default.nix
@@ -1,28 +1,30 @@
-{ lib, stdenv, fetchzip, ocaml, findlib, libffi, pkg-config, ncurses, integers, bigarray-compat }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libffi, pkg-config, ncurses, integers, bigarray-compat }:
 
 if !lib.versionAtLeast ocaml.version "4.02"
 then throw "ctypes is not available for OCaml ${ocaml.version}"
 else
 
 stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-ctypes-${version}";
+  pname = "ocaml${ocaml.version}-ctypes";
   version = "0.18.0";
 
-  src = fetchzip {
-    url = "https://github.com/ocamllabs/ocaml-ctypes/archive/${version}.tar.gz";
-    sha256 = "03zrbnl16m67ls0yfhq7a4k4238x6x6b3m456g4dw2yqwc153vks";
+  src = fetchFromGitHub {
+    owner = "ocamllabs";
+    repo = "ocaml-ctypes";
+    rev = version;
+    sha256 = "sha256-eu5RAuPYC97IM4XUsUw3HQ1BJlEHQ+eBpsdUE6hd+Q8=";
   };
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ ocaml findlib ncurses ];
   propagatedBuildInputs = [ integers libffi bigarray-compat ];
 
-  buildPhase =  ''
-     make XEN=false libffi.config ctypes-base ctypes-stubs
-     make XEN=false ctypes-foreign
+  buildPhase = ''
+    make XEN=false libffi.config ctypes-base ctypes-stubs
+    make XEN=false ctypes-foreign
   '';
 
-  installPhase =  ''
+  installPhase = ''
     mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
     make install XEN=false
   '';