diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-07-05 21:42:16 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-07-06 11:11:53 +0300 |
commit | 234be397d65393c16d562fda3f397c6de6fd2510 (patch) | |
tree | 2019537e3d10ca595249808baaeb32a5ee5b460f /pkgs/tools/X11 | |
parent | 28560923f237a97065ae2581def202f68a580c78 (diff) | |
download | nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.tar nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.tar.gz nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.tar.bz2 nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.tar.lz nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.tar.xz nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.tar.zst nixpkgs-234be397d65393c16d562fda3f397c6de6fd2510.zip |
xprompt: init at 2.5.0
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r-- | pkgs/tools/X11/xprompt/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/X11/xprompt/default.nix b/pkgs/tools/X11/xprompt/default.nix new file mode 100644 index 00000000000..69149b3889b --- /dev/null +++ b/pkgs/tools/X11/xprompt/default.nix @@ -0,0 +1,56 @@ +{ lib +, stdenv +, fetchFromGitHub +, writeText +, fontconfig +, libX11 +, libXft +, libXinerama +, conf ? null +, nix-update-script +}: + +stdenv.mkDerivation rec { + pname = "xprompt"; + version = "2.5.0"; + + src = fetchFromGitHub { + owner = "phillbush"; + repo = "xprompt"; + rev = "v${version}"; + sha256 = "sha256-pOayKngUlrMY3bFsP4Fi+VsOLKCUQU3tdkZ+0OY1SCo="; + }; + + buildInputs = [ + fontconfig + libX11 + libXft + libXinerama + ]; + + postPatch = with lib; + let + configFile = + if isDerivation conf || builtins.isPath conf + then conf else writeText "config.h" conf; + in + optionalString (conf != null) "cp ${configFile} config.h"; + + makeFlags = [ "PREFIX=$(out)" ]; + + passthru.updateScript = nix-update-script { + attrPath = pname; + }; + + meta = with lib; { + description = "A dmenu rip-off with contextual completion"; + longDescription = '' + XPrompt is a prompt for X. XPrompt features a text input field where the + user can type in a text subject to tab-completion. + ''; + homepage = "https://github.com/phillbush/xprompt"; + license = licenses.mit; + maintainers = with maintainers; [ azahi ]; + platforms = platforms.unix; + }; +} |