about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/sync
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-04-06 16:18:51 +0000
committerAlyssa Ross <hi@alyssa.is>2020-04-06 16:18:51 +0000
commit9afbeb71219925d54b72b0170b2e3be76bad1e28 (patch)
treed80c6bf0441de5412475859de320806b0e5a454c /nixpkgs/pkgs/applications/networking/sync
parent75eafe97f7df0d653bec67f3962214d7c357831f (diff)
parentae6bdcc53584aaf20211ce1814bea97ece08a248 (diff)
downloadnixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar
nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.gz
nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.bz2
nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.lz
nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.xz
nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.zst
nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.zip
Merge commit 'ae6bdcc53584aaf20211ce1814bea97ece08a248'
# Conflicts:
#	nixpkgs/pkgs/build-support/rust/default.nix
#	nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/sync')
-rw-r--r--nixpkgs/pkgs/applications/networking/sync/unison/4.08-compatibility.patch52
-rw-r--r--nixpkgs/pkgs/applications/networking/sync/unison/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/sync/unison/lablgtk.patch31
3 files changed, 89 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/sync/unison/4.08-compatibility.patch b/nixpkgs/pkgs/applications/networking/sync/unison/4.08-compatibility.patch
new file mode 100644
index 000000000000..a6921b516f07
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/sync/unison/4.08-compatibility.patch
@@ -0,0 +1,52 @@
+From 29fa058c3127f3b47c347dcaa4a94f4c0e888308 Mon Sep 17 00:00:00 2001
+From: Jaap Boender <jaapb@kerguelen.org>
+Date: Thu, 21 Mar 2019 12:26:51 +0000
+Subject: [PATCH] Compatibility with OCaml 4.08
+
+---
+ src/files.ml                 | 2 +-
+ src/recon.ml                 | 4 ++--
+ src/system/system_generic.ml | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/files.ml b/src/files.ml
+index ba42ad57..5babf21e 100644
+--- a/src/files.ml
++++ b/src/files.ml
+@@ -722,7 +722,7 @@ let get_files_in_directory dir =
+   with End_of_file ->
+     dirh.System.closedir ()
+   end;
+-  Sort.list (<) !files
++  List.sort String.compare !files
+ 
+ let ls dir pattern =
+   Util.convertUnixErrorsToTransient
+diff --git a/src/recon.ml b/src/recon.ml
+index 5ed358d7..0df2cfe4 100644
+--- a/src/recon.ml
++++ b/src/recon.ml
+@@ -651,8 +651,8 @@ let rec reconcile
+ 
+ (* Sorts the paths so that they will be displayed in order                   *)
+ let sortPaths pathUpdatesList =
+-  Sort.list
+-    (fun (p1, _) (p2, _) -> Path.compare p1 p2 <= 0)
++  List.sort
++    Path.compare
+     pathUpdatesList
+ 
+ let rec enterPath p1 p2 t =
+diff --git a/src/system/system_generic.ml b/src/system/system_generic.ml
+index ed8e18f3..0e28a781 100755
+--- a/src/system/system_generic.ml
++++ b/src/system/system_generic.ml
+@@ -47,7 +47,7 @@ let open_out_gen = open_out_gen
+ let chmod = Unix.chmod
+ let chown = Unix.chown
+ let utimes = Unix.utimes
+-let link = Unix.link
++let link s d = Unix.link s d
+ let openfile = Unix.openfile
+ let opendir f =
+   let h = Unix.opendir f in
diff --git a/nixpkgs/pkgs/applications/networking/sync/unison/default.nix b/nixpkgs/pkgs/applications/networking/sync/unison/default.nix
index c29bd3a486cc..9c49b22d9443 100644
--- a/nixpkgs/pkgs/applications/networking/sync/unison/default.nix
+++ b/nixpkgs/pkgs/applications/networking/sync/unison/default.nix
@@ -27,6 +27,12 @@ stdenv.mkDerivation (rec {
     "UISTYLE=${if enableX11 then "gtk2" else "text"}"
   ] ++ stdenv.lib.optional (!ocaml.nativeCompilers) "NATIVE=false";
 
+  patches = [
+    # NOTE: Only needed until Unison 2.51.3 is released!
+    ./4.08-compatibility.patch
+    ./lablgtk.patch
+  ];
+
   preInstall = "mkdir -p $out/bin";
 
   postInstall = if enableX11 then ''
diff --git a/nixpkgs/pkgs/applications/networking/sync/unison/lablgtk.patch b/nixpkgs/pkgs/applications/networking/sync/unison/lablgtk.patch
new file mode 100644
index 000000000000..20c1db1b1166
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/sync/unison/lablgtk.patch
@@ -0,0 +1,31 @@
+From 2e7ea9481c6c3ff2ec513c39f73cfe15c0763c06 Mon Sep 17 00:00:00 2001
+From: daviddavid <geiger.david68210@gmail.com>
+Date: Mon, 26 Feb 2018 13:36:36 +0100
+Subject: [PATCH] Fix for lablgtk >= 2.18.6
+
+---
+ src/uigtk2.ml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/uigtk2.ml b/src/uigtk2.ml
+index 2ba6d79..04c4da4 100644
+--- a/src/uigtk2.ml
++++ b/src/uigtk2.ml
+@@ -89,12 +89,12 @@ let fontItalic = lazy (Pango.Font.from_string "italic")
+ (* This does not work with the current version of Lablgtk, due to a bug
+ let icon =
+   GdkPixbuf.from_data ~width:48 ~height:48 ~has_alpha:true
+-    (Gpointer.region_of_string Pixmaps.icon_data)
++    (Gpointer.region_of_bytes Pixmaps.icon_data)
+ *)
+ let icon =
+   let p = GdkPixbuf.create ~width:48 ~height:48 ~has_alpha:true () in
+   Gpointer.blit
+-    (Gpointer.region_of_string Pixmaps.icon_data) (GdkPixbuf.get_pixels p);
++    (Gpointer.region_of_bytes Pixmaps.icon_data) (GdkPixbuf.get_pixels p);
+   p
+ 
+ let leftPtrWatch =
+-- 
+2.25.1
+