nixpkgs/pkgs/by-name/xb/xbanish/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
1.2 KiB
Nix

{lib, stdenv, fetchFromGitHub, libX11, libXi, libXt, libXfixes, libXext}:
stdenv.mkDerivation rec {
version = "1.8";
pname = "xbanish";
buildInputs = [
libX11 libXi libXt libXfixes libXext
];
src = fetchFromGitHub {
owner = "jcs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-jwCoJ2shFGuJHhmXmlw/paFpMl5ARD6e5zDnDZHlsoo=";
};
makeFlags=[ "PREFIX=$(out)" ];
preInstall = ''
mkdir -p $out/bin $out/man/man1
'';
meta = {
description = "Hides mouse pointer while not in use";
longDescription = ''
xbanish hides the mouse cursor when you start typing, and shows it again when
the mouse cursor moves or a mouse button is pressed. This is similar to
xterm's pointerMode setting, but xbanish works globally in the X11 session.
unclutter's -keystroke mode is supposed to do this, but it's broken[0]. I
looked into fixing it, but the unclutter source code is terrible, so I wrote
xbanish.
The name comes from ratpoison's "banish" command that sends the cursor to the
corner of the screen.
'';
license = lib.licenses.bsd3;
maintainers = [lib.maintainers.choochootrain];
platforms = lib.platforms.linux;
mainProgram = "xbanish";
};
}