depot/third_party/nixpkgs/pkgs/tools/X11/pmenu/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

61 lines
1.2 KiB
Nix

{ 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";
};
})