From a99d7b1071d9ab31250311065052e3352fb94f14 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 17 Jul 2016 17:26:22 +0200 Subject: [PATCH 1/2] ocaml-topkg: init at 0.7.8 --- .../ocaml-modules/topkg/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/ocaml-modules/topkg/default.nix diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix new file mode 100644 index 000000000000..4fd6589cfb58 --- /dev/null +++ b/pkgs/development/ocaml-modules/topkg/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, ocaml, findlib, result, opam }: + +let ocaml-version = stdenv.lib.getVersion ocaml; in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml-version}-topkg-${version}"; + version = "0.7.8"; + + src = fetchurl { + url = "http://erratique.ch/software/topkg/releases/topkg-${version}.tbz"; + sha256 = "029lbmabczpmcgkj53mc20vmpcn3f7rf7xms4xf0nywswfzsash6"; + }; + + nativeBuildInputs = [ opam ]; + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ result ]; + + unpackCmd = "tar xjf ${src}"; + buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml-version}/site-lib/ pkg/pkg.ml build"; + createFindlibDestdir = true; + installPhase = '' + opam-installer --script --prefix=$out topkg.install | sh + mv $out/lib/topkg $out/lib/ocaml/${ocaml-version}/site-lib/ + ''; + + meta = { + homepage = http://erratique.ch/software/topkg; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + description = "A packager for distributing OCaml software"; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8421932c393d..b81bc2621933 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5393,6 +5393,8 @@ in stringext = callPackage ../development/ocaml-modules/stringext { }; + topkg = callPackage ../development/ocaml-modules/topkg { }; + tsdl = callPackage ../development/ocaml-modules/tsdl { }; twt = callPackage ../development/ocaml-modules/twt { }; From 1e419d505b7d2a38abfd945c8e43f9db7209ecee Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 18 Jul 2016 20:23:08 +0200 Subject: [PATCH 2/2] ocaml-uucd: 2.0.0 -> 4.0.0 --- pkgs/development/ocaml-modules/uucd/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/uucd/default.nix b/pkgs/development/ocaml-modules/uucd/default.nix index 8e497560c68e..2f19b2c17efc 100644 --- a/pkgs/development/ocaml-modules/uucd/default.nix +++ b/pkgs/development/ocaml-modules/uucd/default.nix @@ -1,7 +1,7 @@ -{stdenv, fetchurl, ocaml, findlib, opam, xmlm}: +{ stdenv, fetchurl, ocaml, findlib, opam, xmlm, topkg }: let pname = "uucd"; - version = "2.0.0"; + version = "4.0.0"; webpage = "http://erratique.ch/software/${pname}"; ocaml_version = (builtins.parseDrvName ocaml.name).version; in @@ -11,16 +11,16 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${webpage}/releases/${pname}-${version}.tbz"; - sha256 = "12lbrrdjwdxfa99pbg344dfkj51lr5d2ispcj7d7lwsqyxy6h57i"; + sha256 = "11cjfwa4wjhsyvzq4wl9z44xi28n49drz8nbfpx754vyfzwj3yc6"; }; - buildInputs = [ ocaml findlib opam xmlm ]; + buildInputs = [ ocaml findlib opam topkg ]; createFindlibDestdir = true; unpackCmd = "tar xjf $src"; - buildPhase = "ocaml ./pkg/build.ml native=true native-dynlink=true"; + inherit (topkg) buildPhase; installPhase = '' opam-installer --script --prefix=$out ${pname}.install > install.sh