2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, writeText
|
|
|
|
, fontconfig
|
|
|
|
, imlib2
|
|
|
|
, libX11
|
|
|
|
, libXft
|
|
|
|
, libXinerama
|
|
|
|
, conf ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xnotify";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.9.3";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phillbush";
|
|
|
|
repo = "xnotify";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-RfnmiAEFTPqQZursyVPDIZ6J3KBouvaaxyhTc1liqBc=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fontconfig
|
|
|
|
imlib2
|
|
|
|
libX11
|
|
|
|
libXft
|
|
|
|
libXinerama
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch =
|
2022-07-14 12:49:19 +00:00
|
|
|
let
|
|
|
|
configFile =
|
2024-09-19 14:19:46 +00:00
|
|
|
if lib.isDerivation conf || builtins.isPath conf
|
2022-07-14 12:49:19 +00:00
|
|
|
then conf else writeText "config.h" conf;
|
|
|
|
in
|
2024-09-19 14:19:46 +00:00
|
|
|
lib.optionalString (conf != null) "cp ${configFile} config.h";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to read notifications from stdin and pop them up on the screen";
|
2022-07-14 12:49:19 +00:00
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "xnotify";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|