Skip to content

Commit

Permalink
Merge pull request NixOS#219604 from wegank/glsurf-ocaml
Browse files Browse the repository at this point in the history
glsurf: migrate to OCaml 4.14
  • Loading branch information
wegank authored Mar 6, 2023
2 parents 4f7c367 + a56529a commit 55bb9cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkgs/applications/science/math/glsurf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@ stdenv.mkDerivation rec {
] ++ (with ocamlPackages; [
camlp4
lablgl
camlimages_4_2_4
camlimages
num
]);

postPatch = ''
for f in callbacks*/Makefile src/Makefile; do
substituteInPlace "$f" --replace "+camlp4" \
"${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4"
done
# Fatal error: exception Sys_error("Mutex.unlock: Operation not permitted")
sed -i "/gl_started/d" src/draw.ml* src/main.ml
'';

installPhase = ''
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20179,7 +20179,9 @@ with pkgs;
glpk = callPackage ../development/libraries/glpk { };

glsurf = callPackage ../applications/science/math/glsurf {
ocamlPackages = ocaml-ng.ocamlPackages_4_05;
ocamlPackages = ocaml-ng.mkOcamlPackages (ocaml-ng.ocamlPackages_4_14.ocaml.override {
unsafeStringSupport = true;
});
};

glui = callPackage ../development/libraries/glui {};
Expand Down

0 comments on commit 55bb9cd

Please sign in to comment.