summaryrefslogtreecommitdiff
path: root/tw/packages/xorg.scm
diff options
context:
space:
mode:
authorTimo Wilken2022-12-30 20:52:54 +0100
committerTimo Wilken2022-12-30 20:53:00 +0100
commit54f0a727c312b82e5d1c25ca81b62344bbb56e10 (patch)
tree52afb81ba50d2d2e2ef4f0ca01466b601539e766 /tw/packages/xorg.scm
parent26254909ef077cff721f7c7acb1ea80c00156e5a (diff)
Import custom packages
Also, import package modules instead of using `specifications->packages'.
Diffstat (limited to 'tw/packages/xorg.scm')
-rw-r--r--tw/packages/xorg.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/tw/packages/xorg.scm b/tw/packages/xorg.scm
new file mode 100644
index 00000000..748c0503
--- /dev/null
+++ b/tw/packages/xorg.scm
@@ -0,0 +1,44 @@
+(define-module (tw packages xorg)
+ #:use-module (gnu packages xorg)
+ #:use-module (guix build utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages))
+
+(define-public xcwd
+ (package
+ (name "xcwd")
+ (version "1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/schischi/xcwd")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "02i1149nn7ccshggqra6865jx1ayv6n4q4cdqypl1rs8m0gzbbrk"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; no tests defined
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; there is no ./configure
+ (add-before 'build 'set-prefix-in-makefile
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Modify the makefile so that its 'prefix' variable points to "out".
+ (substitute* "Makefile"
+ (("prefix=.*")
+ (string-append "prefix=" (assoc-ref outputs "out") "\n")))))
+ (add-before 'install 'create-bin-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The Makefile assumes that $(prefix)/bin already exists.
+ (mkdir-p (string-append (assoc-ref outputs "out") "/bin")))))))
+ (inputs (list libx11))
+ (home-page "https://github.com/schischi/xcwd")
+ (synopsis "A simple tool that prints the current working directory of the currently focused window")
+ (description "\
+xcwd is a simple tool that prints the current working directory of the
+currently focused window. The main goal is to launch applications
+directly into the same directory as the focused applications. This is
+especially useful to open a new terminal or a file explorer.")
+ (license license:bsd-3)))