depot/third_party/nixpkgs/pkgs/tools/X11/xnotify/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

55 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, writeText
, fontconfig
, imlib2
, libX11
, libXft
, libXinerama
, conf ? null
}:
stdenv.mkDerivation rec {
pname = "xnotify";
version = "0.9.3";
src = fetchFromGitHub {
owner = "phillbush";
repo = "xnotify";
rev = "v${version}";
hash = "sha256-RfnmiAEFTPqQZursyVPDIZ6J3KBouvaaxyhTc1liqBc=";
};
buildInputs = [
fontconfig
imlib2
libX11
libXft
libXinerama
];
postPatch = with lib;
let
configFile =
if isDerivation conf || builtins.isPath conf
then conf else writeText "config.h" conf;
in
optionalString (conf != null) "cp ${configFile} config.h";
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Tool to read notifications from stdin and pop them up on the screen";
longDescription = ''
XNotify displays a notification on the screen. XNotify receives a
notification specification in stdin and shows a notification for the user
on the screen.
'';
homepage = "https://github.com/phillbush/xnotify";
license = licenses.mit;
maintainers = with maintainers; [ azahi ];
platforms = platforms.unix;
mainProgram = "xnotify";
};
}