1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, stdenv
, fetchFromGitHub
, writeText
, fontconfig
, imlib2
, libX11
, libXext
, libXft
, libXinerama
, libXrender
, conf ? null
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pmenu";
version = "3.1.1";
src = fetchFromGitHub {
owner = "phillbush";
repo = "pmenu";
rev = "v${finalAttrs.version}";
hash = "sha256-7NI5az3LxOYEnsts8Qqi3gvO3dXpNjPDOTW2c5Y25Lc=";
};
buildInputs = [
fontconfig
imlib2
libX11
libXext
libXft
libXinerama
libXrender
];
postPatch = let
configFile =
if lib.isDerivation conf || builtins.isPath conf
then conf else writeText "config.h" conf;
in
lib.optionalString (conf != null) "mv ${configFile} config.h";
makeFlags = [
"INSTALL=install"
"PREFIX=\${out}"
];
meta = {
description = "A pie-menu tool";
homepage = "https://github.com/phillbush/pmenu";
license = lib.licenses.mit;
longDescription = ''
πmenu is a pie menu utility for X. πmenu receives a menu specification in
stdin, shows a menu for the user to select one of the options, and outputs
the option selected to stdout.
'';
maintainers = [ lib.maintainers.azahi ];
platforms = lib.platforms.unix;
mainProgram = "pmenu";
};
})
|