mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
ocamlPackages.ctypes: switch to fetchFromGitHub
This commit is contained in:
parent
b5bb0514ea
commit
2c8b542e2c
@ -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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user