nixpkgs/pkgs/applications/editors/orbiton/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

2022-08-01 08:36:08 +00:00
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, pkg-config
2023-01-14 18:17:07 +00:00
, withGui ? true, vte
2022-08-01 08:36:08 +00:00
}:
buildGoModule rec {
2023-04-09 15:52:14 +00:00
pname = "orbiton";
2023-07-13 10:32:55 +00:00
version = "2.62.6";
2022-08-01 08:36:08 +00:00
src = fetchFromGitHub {
owner = "xyproto";
2023-04-09 15:52:14 +00:00
repo = "orbiton";
2022-08-01 08:36:08 +00:00
rev = "v${version}";
2023-07-13 10:32:55 +00:00
hash = "sha256-wSefvbpqxEbzgReOBPcot+VeXazwK/NPzh+wmmYhrls=";
2022-08-01 08:36:08 +00:00
};
2023-04-09 14:02:43 +00:00
vendorHash = null;
2022-08-01 08:36:08 +00:00
2023-01-14 18:17:07 +00:00
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace "-Wl,--as-needed" ""
# Requires impure pbcopy and pbpaste
substituteInPlace v2/pbcopy_test.go \
--replace TestPBcopy SkipTestPBcopy
'';
2022-08-01 08:36:08 +00:00
nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ];
buildInputs = lib.optional withGui vte;
preBuild = "cd v2";
postInstall = ''
cd ..
installManPage o.1
2023-04-09 15:52:14 +00:00
mv $out/bin/{orbiton,o}
2022-08-01 08:36:08 +00:00
'' + lib.optionalString withGui ''
make install-gui PREFIX=$out
2023-01-14 18:17:07 +00:00
wrapProgram $out/bin/og --prefix PATH : $out/bin
2022-08-01 08:36:08 +00:00
'';
meta = with lib; {
description = "Config-free text editor and IDE limited to VT100";
2023-04-09 15:52:14 +00:00
homepage = "https://github.com/xyproto/orbiton";
2022-08-01 08:36:08 +00:00
license = licenses.bsd3;
maintainers = with maintainers; [ sikmir ];
2023-04-09 15:52:14 +00:00
mainProgram = "o";
2022-08-01 08:36:08 +00:00
};
}