nixpkgs/pkgs/by-name/_3/_3mux/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

69 lines
2.0 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
makeWrapper,
}:
buildGoModule rec {
pname = "3mux";
version = "1.1.0";
src = fetchFromGitHub {
owner = "aaronjanse";
repo = pname;
rev = "v${version}";
sha256 = "sha256-QT4QXTlJf2NfTqXE4GF759EoW6Ri12lxDyodyEFc+ag=";
};
patches = [
# 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=";
})
# Fix the build for Darwin when building with Go 1.18.
# https://github.com/aaronjanse/3mux/pull/127
(fetchpatch {
name = "darwin-go-1.18-fix.patch";
url = "https://github.com/aaronjanse/3mux/commit/f2c26c1037927896d6e9a17ea038f8260620fbd4.patch";
hash = "sha256-RC3p30r0PGUKrxo8uOLL02oyfLqLfhNjBYy6E+OQ2f0=";
})
];
nativeBuildInputs = [ makeWrapper ];
vendorHash = "sha256-KMcl6mj+cEgvdZMzBxUtGJsgwPdFuXrY3yjmkB3CS4o=";
# 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
'';
meta = with lib; {
description = "Terminal multiplexer inspired by i3";
mainProgram = "3mux";
longDescription = ''
Terminal multiplexer with out-of-the-box support for search,
mouse-controlled scrollback, and i3-like keybindings
'';
homepage = "https://github.com/aaronjanse/3mux";
license = licenses.mit;
maintainers = with maintainers; [
aaronjanse
Br1ght0ne
];
platforms = platforms.unix;
};
}