ocaml: num: Allow to disable dynamic linking

This commit is contained in:
Alexander Bantyev 2019-11-14 23:28:51 +03:00
parent 81ca7cc0a7
commit 07b838f13b
No known key found for this signature in database
GPG key ID: E081FF12ADCB4AD5
2 changed files with 15 additions and 1 deletions

View file

@ -14,13 +14,15 @@ stdenv.mkDerivation rec {
url = "https://github.com/ocaml/num/commit/6d4c6d476c061298e6385e8a0864f083194b9307.patch";
sha256 = "18zlvb5n327q8y3c52js5dvyy29ssld1l53jqng8m9w1k24ypi0b";
})
./enable-static.patch
];
nativeBuildInputs = [ ocaml findlib ];
buildInputs = [ findlib ];
buildInputs = [ ocaml findlib ];
createFindlibDestdir = true;
meta = {
description = "Legacy Num library for arbitrary-precision integer and rational arithmetic";
license = stdenv.lib.licenses.lgpl21;

View file

@ -0,0 +1,12 @@
diff -u a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -45,7 +45,7 @@
endif
libnums.$(A): $(COBJS)
- $(OCAMLMKLIB) -oc nums $(COBJS)
+ $(OCAMLMKLIB) -custom -oc nums $(COBJS)
nums.cma: $(CMOS)
$(OCAMLMKLIB) -o nums -oc nums -linkall $(CMOS)