2022-08-08 03:03:02 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, makeWrapper }:
|
2020-04-13 10:49:57 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "3mux";
|
2021-03-14 02:44:59 +00:00
|
|
|
version = "1.1.0";
|
2020-04-13 10:49:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aaronjanse";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-14 02:44:59 +00:00
|
|
|
sha256 = "sha256-QT4QXTlJf2NfTqXE4GF759EoW6Ri12lxDyodyEFc+ag=";
|
2020-04-13 10:49:57 +00:00
|
|
|
};
|
|
|
|
|
2022-08-08 03:03:02 +00:00
|
|
|
patches = [
|
2022-11-27 08:13:23 +00:00
|
|
|
# Needed so that the subsequent patch applies.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "use-shorter-uuids.patch";
|
|
|
|
url = "https://github.com/aaronjanse/3mux/commit/6dd36694586f96e3c82ef7db1a0e7917ceb05794.patch";
|
|
|
|
hash = "sha256-FnFupOIIQi66mvjshn3EQ6XRzC4cLx3vGTeTUM1HOwM=";
|
|
|
|
})
|
2022-08-08 03:03:02 +00:00
|
|
|
# Fix the build for Darwin when building with Go 1.18.
|
2022-09-25 20:56:08 +00:00
|
|
|
# https://github.com/aaronjanse/3mux/pull/127
|
2022-08-08 03:03:02 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "darwin-go-1.18-fix.patch";
|
2022-11-27 08:13:23 +00:00
|
|
|
url = "https://github.com/aaronjanse/3mux/commit/f2c26c1037927896d6e9a17ea038f8260620fbd4.patch";
|
|
|
|
hash = "sha256-RC3p30r0PGUKrxo8uOLL02oyfLqLfhNjBYy6E+OQ2f0=";
|
2022-08-08 03:03:02 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-14 02:44:59 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2022-11-27 08:13:23 +00:00
|
|
|
vendorHash = "sha256-KMcl6mj+cEgvdZMzBxUtGJsgwPdFuXrY3yjmkB3CS4o=";
|
2021-03-14 02:44:59 +00:00
|
|
|
|
|
|
|
# This is a package used for internally testing 3mux. It's meant for
|
|
|
|
# use by 3mux maintainers/contributors only.
|
|
|
|
excludedPackages = [ "fuzz" ];
|
|
|
|
|
|
|
|
# 3mux needs to have itself in the path so users can run `3mux detach`.
|
|
|
|
# This ensures that, while inside 3mux, the binary in the path is the
|
|
|
|
# same version as the 3mux hosting the session. This also allows users
|
|
|
|
# to use 3mux via `nix run nixpkgs#_3mux` (otherwise they'd get "command
|
|
|
|
# not found").
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/3mux --prefix PATH : $out/bin
|
|
|
|
'';
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-13 10:49:57 +00:00
|
|
|
description = "Terminal multiplexer inspired by i3";
|
2020-10-09 18:15:04 +00:00
|
|
|
longDescription = ''
|
2021-03-14 02:44:59 +00:00
|
|
|
Terminal multiplexer with out-of-the-box support for search,
|
|
|
|
mouse-controlled scrollback, and i3-like keybindings
|
2020-10-09 18:15:04 +00:00
|
|
|
'';
|
2020-04-13 10:49:57 +00:00
|
|
|
homepage = "https://github.com/aaronjanse/3mux";
|
|
|
|
license = licenses.mit;
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ aaronjanse Br1ght0ne ];
|
2020-10-09 18:15:04 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-13 10:49:57 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|