forked from mirrors/nixpkgs
commit
a2d165a9dc
|
@ -1,25 +1,29 @@
|
||||||
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, pkg-config
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, pkg-config
|
||||||
, tcsh
|
, withGui ? true, vte
|
||||||
, withGui ? stdenv.isLinux, vte # vte is broken on darwin
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "o";
|
pname = "o";
|
||||||
version = "2.57.0";
|
version = "2.58.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "xyproto";
|
owner = "xyproto";
|
||||||
repo = "o";
|
repo = "o";
|
||||||
rev = "v${version}";
|
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;
|
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 ];
|
nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ];
|
||||||
|
|
||||||
buildInputs = lib.optional withGui vte;
|
buildInputs = lib.optional withGui vte;
|
||||||
|
@ -31,7 +35,7 @@ buildGoModule rec {
|
||||||
installManPage o.1
|
installManPage o.1
|
||||||
'' + lib.optionalString withGui ''
|
'' + lib.optionalString withGui ''
|
||||||
make install-gui PREFIX=$out
|
make install-gui PREFIX=$out
|
||||||
wrapProgram $out/bin/ko --prefix PATH : $out/bin
|
wrapProgram $out/bin/og --prefix PATH : $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue