From ecc593842b7e5e0cd83dbea08a0d7af67b720926 Mon Sep 17 00:00:00 2001 From: Yongun Seong Date: Fri, 15 Nov 2024 21:09:31 +0900 Subject: [PATCH 1/3] unison: 2.53.5 -> 2.53.7 Diff: https://github.com/bcpierce00/unison/compare/v2.53.5...v2.53.7 --- pkgs/by-name/un/unison/package.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/un/unison/package.nix b/pkgs/by-name/un/unison/package.nix index d0298c7f1584..ff713f0e32df 100644 --- a/pkgs/by-name/un/unison/package.nix +++ b/pkgs/by-name/un/unison/package.nix @@ -11,22 +11,17 @@ stdenv.mkDerivation (finalAttrs: { pname = "unison"; - version = "2.53.5"; + version = "2.53.7"; src = fetchFromGitHub { owner = "bcpierce00"; repo = "unison"; rev = "v${finalAttrs.version}"; - hash = "sha256-XCdK38jG7tRI+/Zk72JVY8a/pPJF6KVaf8l2s3hgxLs="; + hash = "sha256-QmYcxzsnbRDQdqkLh82OLWrLF6v3qzf1aOIcnz0kwEk="; }; strictDeps = true; - # uimac requires xcode - postPatch = '' - sed -i -e 's/ macuimaybe//' src/Makefile - ''; - nativeBuildInputs = [ ocamlPackages.ocaml ocamlPackages.findlib ] ++ lib.optionals enableX11 [ copyDesktopItems wrapGAppsHook3 ]; buildInputs = lib.optionals enableX11 [ gsettings-desktop-schemas ocamlPackages.lablgtk3 ]; From 00d97b15f2a4138cfe94a8ecd460fe49fb434758 Mon Sep 17 00:00:00 2001 From: Yongun Seong Date: Fri, 15 Nov 2024 21:10:08 +0900 Subject: [PATCH 2/3] unison: remove with lib --- pkgs/by-name/un/unison/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/un/unison/package.nix b/pkgs/by-name/un/unison/package.nix index ff713f0e32df..5ef00224f5c8 100644 --- a/pkgs/by-name/un/unison/package.nix +++ b/pkgs/by-name/un/unison/package.nix @@ -47,12 +47,12 @@ stdenv.mkDerivation (finalAttrs: { startupWMClass = "Unison"; }); - meta = with lib; { + meta = { homepage = "https://www.cis.upenn.edu/~bcpierce/unison/"; description = "Bidirectional file synchronizer"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ nevivurn ]; - platforms = platforms.unix; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ nevivurn ]; + platforms = lib.platforms.unix; broken = stdenv.hostPlatform.isDarwin && enableX11; # unison-gui and uimac are broken on darwin mainProgram = if enableX11 then "unison-gui" else "unison"; }; From f9fdde592d1dcea1b3b6deb16fe92d8c2f36a90a Mon Sep 17 00:00:00 2001 From: Yongun Seong Date: Fri, 15 Nov 2024 21:10:50 +0900 Subject: [PATCH 3/3] unison: nixfmt --- pkgs/by-name/un/unison/package.nix | 46 ++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/un/unison/package.nix b/pkgs/by-name/un/unison/package.nix index 5ef00224f5c8..75ff3c4e2f51 100644 --- a/pkgs/by-name/un/unison/package.nix +++ b/pkgs/by-name/un/unison/package.nix @@ -1,12 +1,13 @@ -{ lib -, stdenv -, fetchFromGitHub -, ocamlPackages -, copyDesktopItems -, makeDesktopItem -, wrapGAppsHook3 -, gsettings-desktop-schemas -, enableX11 ? !stdenv.hostPlatform.isDarwin +{ + lib, + stdenv, + fetchFromGitHub, + ocamlPackages, + copyDesktopItems, + makeDesktopItem, + wrapGAppsHook3, + gsettings-desktop-schemas, + enableX11 ? !stdenv.hostPlatform.isDarwin, }: stdenv.mkDerivation (finalAttrs: { @@ -22,12 +23,23 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; - nativeBuildInputs = [ ocamlPackages.ocaml ocamlPackages.findlib ] - ++ lib.optionals enableX11 [ copyDesktopItems wrapGAppsHook3 ]; - buildInputs = lib.optionals enableX11 [ gsettings-desktop-schemas ocamlPackages.lablgtk3 ]; + nativeBuildInputs = + [ + ocamlPackages.ocaml + ocamlPackages.findlib + ] + ++ lib.optionals enableX11 [ + copyDesktopItems + wrapGAppsHook3 + ]; + buildInputs = lib.optionals enableX11 [ + gsettings-desktop-schemas + ocamlPackages.lablgtk3 + ]; - makeFlags = [ "PREFIX=$(out)" ] - ++ lib.optionals (!ocamlPackages.ocaml.nativeCompilers) [ "NATIVE=false" ]; + makeFlags = [ + "PREFIX=$(out)" + ] ++ lib.optionals (!ocamlPackages.ocaml.nativeCompilers) [ "NATIVE=false" ]; postInstall = lib.optionalString enableX11 '' install -D $src/icons/U.svg $out/share/icons/hicolor/scalable/apps/unison.svg @@ -42,7 +54,11 @@ stdenv.mkDerivation (finalAttrs: { genericName = "File synchronization tool"; exec = "unison-gui"; icon = "unison"; - categories = [ "Utility" "FileTools" "GTK" ]; + categories = [ + "Utility" + "FileTools" + "GTK" + ]; startupNotify = true; startupWMClass = "Unison"; });