nixpkgs/pkgs/tools/misc/unclutter/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

37 lines
1.1 KiB
Nix

{lib, stdenv, fetchurl, xlibsWrapper}:
stdenv.mkDerivation {
name = "unclutter-8";
src = fetchurl {
url = "https://www.ibiblio.org/pub/X11/contrib/utilities/unclutter-8.tar.gz";
sha256 = "33a78949a7dedf2e8669ae7b5b2c72067896497820292c96afaa60bb71d1f2a6";
};
buildInputs = [xlibsWrapper];
buildFlags = [ "CC=cc" ];
installPhase = ''
mkdir -pv "$out/bin"
mkdir -pv "$out/share/man/man1"
make DESTDIR="$out" BINDIR="$out/bin" PREFIX="" install
make DESTDIR="$out" MANPATH="$out/share/man" PREFIX="" install.man
'';
meta = with lib; {
description = "Hides mouse pointer while not in use";
longDescription = ''
Unclutter hides your X mouse cursor when you do not need it, to prevent
it from getting in the way. You have only to move the mouse to restore
the mouse cursor. Unclutter is very useful in tiling wm's where you do
not need the mouse often.
Just run it from your .bash_profile like that:
unclutter -idle 1 &
'';
maintainers = with maintainers; [ domenkozar ];
platforms = platforms.unix;
license = stdenv.lib.licenses.publicDomain;
};
}