summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/zed
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/ocaml-modules/zed
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/ocaml-modules/zed')
-rw-r--r--pkgs/development/ocaml-modules/zed/default.nix48
1 files changed, 15 insertions, 33 deletions
diff --git a/pkgs/development/ocaml-modules/zed/default.nix b/pkgs/development/ocaml-modules/zed/default.nix
index 66054b33407..a7889523bcc 100644
--- a/pkgs/development/ocaml-modules/zed/default.nix
+++ b/pkgs/development/ocaml-modules/zed/default.nix
@@ -1,36 +1,19 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, camomile, react, dune, charInfo_width }:
+{ lib, buildDunePackage, fetchFromGitHub, camomile, react, charInfo_width }:
 
-let param =
-  if stdenv.lib.versionAtLeast ocaml.version "4.02" then
-  {
-    version = "2.0.3";
-    sha256 = "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55";
-    buildInputs = [ dune ];
-    propagatedBuildInputs = [ charInfo_width ];
-    extra = {
-     buildPhase = "dune build -p zed";
-     inherit (dune) installPhase; };
-  } else {
-    version = "1.4";
-    sha256 = "0d8qfy0qiydrrqi8qc9rcwgjigql6vx9gl4zp62jfz1lmjgb2a3w";
-    buildInputs = [ ocamlbuild ];
-    propagatedBuildInputs = [ camomile ];
-    extra = { createFindlibDestdir = true; };
-  }
-; in
+buildDunePackage rec {
+  pname = "zed";
+  version = "3.1.0";
 
-stdenv.mkDerivation (rec {
-  inherit (param) version;
-  name = "ocaml-zed-${version}";
+  useDune2 = true;
 
-  src = fetchzip {
-    url = "https://github.com/diml/zed/archive/${version}.tar.gz";
-    inherit (param) sha256;
+  src = fetchFromGitHub {
+    owner = "ocaml-community";
+    repo = pname;
+    rev = version;
+    sha256 = "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p";
   };
 
-  buildInputs = [ ocaml findlib ] ++ param.buildInputs;
-
-  propagatedBuildInputs = [ react ] ++ param.propagatedBuildInputs;
+  propagatedBuildInputs = [ charInfo_width react ];
 
   meta = {
     description = "Abstract engine for text edition in OCaml";
@@ -41,11 +24,10 @@ stdenv.mkDerivation (rec {
 
     To support efficient text edition capabilities, Zed provides macro recording and cursor management facilities.
     '';
-    homepage = "https://github.com/diml/zed";
-    license = stdenv.lib.licenses.bsd3;
-    platforms = ocaml.meta.platforms or [];
+    inherit (src.meta) homepage;
+    license = lib.licenses.bsd3;
     maintainers = [
-      stdenv.lib.maintainers.gal_bolle
+      lib.maintainers.gal_bolle
     ];
   };
-} // param.extra)
+}