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