15 inherit (pkgsHostTarget.targetPackages.stdenv) cc;
18 stdenv.mkDerivation rec {
23 url = "https://raffalli.eu/~christophe/glsurf/glsurf-${version}.tar.gz";
24 sha256 = "0w8xxfnw2snflz8wdr2ca9f5g91w5vbyp1hwlx1v7vg83d4bwqs7";
29 ] ++ (with ocamlPackages; [
40 ] ++ (with ocamlPackages; [
48 for f in callbacks*/Makefile src/Makefile; do
49 substituteInPlace "$f" --replace "+camlp4" \
50 "${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4"
53 # Fatal error: exception Sys_error("Mutex.unlock: Operation not permitted")
54 sed -i "/gl_started/d" src/draw.ml* src/main.ml
58 mkdir -p $out/bin $out/share/doc/glsurf
59 cp ./src/glsurf.opt $out/bin/glsurf
60 cp ./doc/doc.pdf $out/share/doc/glsurf
61 cp -r ./examples $out/share/doc/glsurf
63 wrapProgram "$out/bin/glsurf" --set CC "${cc}/bin/${cc.targetPrefix}cc"
67 homepage = "https://raffalli.eu/~christophe/glsurf/";
68 description = "A program to draw implicit surfaces and curves";
69 mainProgram = "glsurf";
70 license = lib.licenses.gpl2Plus;
71 platforms = lib.platforms.all;