diff --git a/pkgs/development/ocaml-modules/ocamlgraph/default.nix b/pkgs/development/ocaml-modules/ocamlgraph/default.nix index 5ae4f6ad3fa7..a7815d951cd3 100644 --- a/pkgs/development/ocaml-modules/ocamlgraph/default.nix +++ b/pkgs/development/ocaml-modules/ocamlgraph/default.nix @@ -1,39 +1,26 @@ -{ stdenv, lib, fetchurl, ocaml, findlib -, gtkSupport ? true -, lablgtk -}: +{ lib, fetchurl, buildDunePackage, stdlib-shims }: -stdenv.mkDerivation rec { +buildDunePackage rec { pname = "ocamlgraph"; - version = "1.8.8"; + version = "2.0.0"; src = fetchurl { - url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz"; - sha256 = "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"; + url = "https://github.com/backtracking/ocamlgraph/releases/download/${version}/ocamlgraph-${version}.tbz"; + sha256 = "029692bvdz3hxpva9a2jg5w5381fkcw55ysdi8424lyyjxvjdzi0"; }; - buildInputs = [ ocaml findlib ] - ++ lib.optional gtkSupport lablgtk - ; + minimalOCamlVersion = "4.03"; + useDune2 = true; - createFindlibDestdir = true; + propagatedBuildInputs = [ + stdlib-shims + ]; - buildFlags = [ "all" ]; - installTargets = [ "install-findlib" ]; - - postInstall = lib.optionalString gtkSupport '' - mkdir -p $out/bin - cp dgraph/dgraph.opt $out/bin/graph-viewer - cp editor/editor.opt $out/bin/graph-editor - ''; - - meta = { - homepage = "http://ocamlgraph.lri.fr/"; - description = "Graph library for Objective Caml"; - license = lib.licenses.gpl2Oss; - platforms = ocaml.meta.platforms or []; - maintainers = [ - lib.maintainers.kkallio - ]; + meta = with lib; { + homepage = "http://ocamlgraph.lri.fr/"; + downloadPage = "https://github.com/backtracking/ocamlgraph"; + description = "Graph library for OCaml"; + license = licenses.gpl2Oss; + maintainers = with maintainers; [ kkallio superherointj ]; }; } diff --git a/pkgs/development/ocaml-modules/ocamlgraph/gtk.nix b/pkgs/development/ocaml-modules/ocamlgraph/gtk.nix new file mode 100644 index 000000000000..1aa438ffa448 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocamlgraph/gtk.nix @@ -0,0 +1,12 @@ +{ buildDunePackage, lablgtk, ocamlgraph, stdlib-shims, ... }: + +buildDunePackage rec { + pname = "ocamlgraph_gtk"; + inherit (ocamlgraph) version src useDune2 meta; + + propagatedBuildInputs = [ + lablgtk + ocamlgraph + stdlib-shims + ]; +} diff --git a/pkgs/development/tools/analysis/frama-c/default.nix b/pkgs/development/tools/analysis/frama-c/default.nix index a10d015e9ff1..1079974ae623 100644 --- a/pkgs/development/tools/analysis/frama-c/default.nix +++ b/pkgs/development/tools/analysis/frama-c/default.nix @@ -15,6 +15,7 @@ let mlgmpidl num ocamlgraph + stdlib-shims why3 yojson zarith @@ -37,7 +38,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf wrapGAppsHook ]; buildInputs = with ocamlPackages; [ - ncurses ocaml findlib ltl2ba ocamlgraph yojson menhirLib camlzip + ncurses ocaml findlib ltl2ba ocamlgraph ocamlgraph_gtk yojson menhirLib camlzip lablgtk coq graphviz zarith apron why3 mlgmpidl doxygen gdk-pixbuf ]; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 5a6f426b8361..43bc9ba03185 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -829,6 +829,7 @@ let gettext-stub = callPackage ../development/ocaml-modules/ocaml-gettext/stub.nix { }; ocamlgraph = callPackage ../development/ocaml-modules/ocamlgraph { }; + ocamlgraph_gtk = callPackage ../development/ocaml-modules/ocamlgraph/gtk.nix { }; ocaml_http = callPackage ../development/ocaml-modules/http { };