nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 writeText,
6 fontconfig,
7 imlib2,
8 libX11,
9 libXft,
10 libXinerama,
11 conf ? null,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "xnotify";
16 version = "0.9.3";
17
18 src = fetchFromGitHub {
19 owner = "phillbush";
20 repo = "xnotify";
21 rev = "v${finalAttrs.version}";
22 hash = "sha256-RfnmiAEFTPqQZursyVPDIZ6J3KBouvaaxyhTc1liqBc=";
23 };
24
25 buildInputs = [
26 fontconfig
27 imlib2
28 libX11
29 libXft
30 libXinerama
31 ];
32
33 postPatch =
34 let
35 configFile =
36 if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.h" conf;
37 in
38 lib.optionalString (conf != null) "cp ${configFile} config.h";
39
40 makeFlags = [ "PREFIX=$(out)" ];
41
42 meta = {
43 description = "Tool to read notifications from stdin and pop them up on the screen";
44 longDescription = ''
45 XNotify displays a notification on the screen. XNotify receives a
46 notification specification in stdin and shows a notification for the user
47 on the screen.
48 '';
49 homepage = "https://github.com/phillbush/xnotify";
50 license = lib.licenses.mit;
51 maintainers = [ ];
52 platforms = lib.platforms.unix;
53 mainProgram = "xnotify";
54 };
55})