From 9b04ea4e25193959bdcc72bc12df55d00d933acb Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 14 Jan 2023 21:17:07 +0300 Subject: [PATCH] =?UTF-8?q?o:=202.57.0=20=E2=86=92=202.58.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/editors/o/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/o/default.nix b/pkgs/applications/editors/o/default.nix index 5272ea3a5f1b..18654f3901e6 100644 --- a/pkgs/applications/editors/o/default.nix +++ b/pkgs/applications/editors/o/default.nix @@ -1,25 +1,29 @@ { lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, pkg-config -, tcsh -, withGui ? stdenv.isLinux, vte # vte is broken on darwin +, withGui ? true, vte }: buildGoModule rec { pname = "o"; - version = "2.57.0"; + version = "2.58.0"; src = fetchFromGitHub { owner = "xyproto"; repo = "o"; rev = "v${version}"; - hash = "sha256-UKFquf5h1e7gRAZgtcTdEpoNv+TOC8BYb2ED26X274s="; + hash = "sha256-oYWlciTQ/4mm/gTSQEkD/xPeLfDjIAMksjj1DVodZW4="; }; - postPatch = '' - substituteInPlace ko/main.cpp --replace '/bin/csh' '${tcsh}/bin/tcsh' - ''; - vendorSha256 = null; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile \ + --replace "-Wl,--as-needed" "" + + # Requires impure pbcopy and pbpaste + substituteInPlace v2/pbcopy_test.go \ + --replace TestPBcopy SkipTestPBcopy + ''; + nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; buildInputs = lib.optional withGui vte; @@ -31,7 +35,7 @@ buildGoModule rec { installManPage o.1 '' + lib.optionalString withGui '' make install-gui PREFIX=$out - wrapProgram $out/bin/ko --prefix PATH : $out/bin + wrapProgram $out/bin/og --prefix PATH : $out/bin ''; meta = with lib; {