all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#37465] add xftwidth displayed textwidth calculator package
@ 2019-09-20  0:25 Kyle Andrews
  2019-09-25 13:32 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Andrews @ 2019-09-20  0:25 UTC (permalink / raw)
  To: 37465

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

Hello,

I'd like to provide a package definition for the xftwidth calculator
utility so that it may be included into guix. Please see the attached
patch. 

Regards,

Kyle Andrews

[-- Attachment #2: 0001-gnu-Add-xftwidth.patch --]
[-- Type: text/x-patch, Size: 2248 bytes --]

From 60deaa526b4a6ca5a66f3b67ba77aa353409d542 Mon Sep 17 00:00:00 2001
From: Kyle Andrews <kyle.c.andrews@gmail.com>
Date: Thu, 19 Sep 2019 20:16:28 -0400
Subject: [PATCH] gnu: Add xftwidth.

* gnu/packages/wm.scm: added xftwidth package.
---
 gnu/packages/wm.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index e19c6c1438..3e321eeb1c 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -209,6 +209,45 @@ or musca).
     (home-page "https://herbstluftwm.org")
     (license license:bsd-2)))
 
+(define-public xftwidth
+  (package
+    (name "xftwidth")
+    (version "20170402")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+	     (url "https://github.com/vixus0/xftwidth")
+	     (commit "35ff963908d41a8a6a7101c434c88255728025ee")))
+       (sha256
+	(base32
+	 "1jwl25785li24kbp0m1wxfwk4dgxkliynn03nsj813cjr34kq16h"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (inputs `(("freetype"    ,freetype)
+              ("libx11"      ,libx11)
+              ("fontconfig"  ,fontconfig)
+              ("libxft"      ,libxft)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-makefile ; /usr/bin doesn't show up in PATH
+           (lambda _ (substitute* "Makefile" (("usr/") "")) #t))
+         (delete 'check) ; no check included in Makefile
+         (delete 'configure))
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list (string-append "DESTDIR=" out)))))
+    (synopsis "Calculator for determining displayed text widths using Xft fonts.")
+    (description "A small C program to calculate pixel widths for displayed
+text using Xft fonts (given a specific font name and size). It is ideal for
+scripts including text into the custom (e.g. dzen and xmobar based) panels
+often used in conjunction with minimalistic window managers.")
+    (home-page "http://github.com/vixus0/xftwidth")
+    (license license:expat)))
+
 (define-public i3status
   (package
     (name "i3status")
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-29 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-20  0:25 [bug#37465] add xftwidth displayed textwidth calculator package Kyle Andrews
2019-09-25 13:32 ` Ludovic Courtès
2019-09-29 14:24   ` Kyle Andrews
2019-09-29 15:32     ` Tobias Geerinckx-Rice via Guix-patches via
2019-09-29 19:46     ` bug#37465: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.