nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildGoModule,
5 fetchFromGitHub,
6 installShellFiles,
7 makeWrapper,
8 pkg-config,
9 withGui ? true,
10 vte,
11}:
12
13buildGoModule rec {
14 pname = "orbiton";
15 version = "2.70.5";
16
17 src = fetchFromGitHub {
18 owner = "xyproto";
19 repo = "orbiton";
20 tag = "v${version}";
21 hash = "sha256-w2t3IxWB8F2QXB0caTP/kTGum6zec5BRxK9+kYwAcDY=";
22 };
23
24 vendorHash = null;
25
26 nativeBuildInputs = [
27 installShellFiles
28 makeWrapper
29 pkg-config
30 ];
31
32 buildInputs = lib.optional withGui vte;
33
34 preBuild = "cd v2";
35
36 checkFlags =
37 let
38 skippedTests = [
39 "TestPBcopy" # Requires impure pbcopy and pbpaste
40 "TestPkill" # error: no process named "sleep" found
41 ];
42 in
43 [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
44
45 postInstall = ''
46 cd ..
47 installManPage o.1
48 mv $out/bin/{orbiton,o}
49 ''
50 + lib.optionalString withGui ''
51 make install-gui PREFIX=$out
52 wrapProgram $out/bin/og --prefix PATH : $out/bin
53 '';
54
55 meta = {
56 description = "Config-free text editor and IDE limited to VT100";
57 homepage = "https://roboticoverlords.org/orbiton/";
58 license = lib.licenses.bsd3;
59 maintainers = with lib.maintainers; [ sikmir ];
60 mainProgram = "o";
61 };
62}