o: 2.57.0 → 2.58.0

This commit is contained in:
Nikolay Korotkiy 2023-01-14 21:17:07 +03:00
parent 2d068657ea
commit 9b04ea4e25
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5

View file

@ -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; {