forked from mirrors/nixpkgs
commit
a2d165a9dc
|
@ -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; {
|
||||
|
|
Loading…
Reference in a new issue