all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27083: screen-lockers: i3lock-color and i3lock-fancy
@ 2017-05-26 11:33 ng0
  2017-11-17  9:55 ` [bug#27083] " Chris Marusich
  0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-05-26 11:33 UTC (permalink / raw)
  To: 27083

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

I have no idea about the error of i3lock-fancy (password is not accepted).
An commented phase in i3lock-color is still included where I tried to fix this, but I don't know much about PAM at this point.

Finishing touches welcome!

[-- Attachment #2: 0001-gnu-Add-i3lock-color.patch --]
[-- Type: application/octet-stream, Size: 7166 bytes --]

From 0e8c97f5a7d9cc12edbd45aa41693eedfb31a736 Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 13:03:42 +0000
Subject: [PATCH 1/2] gnu: Add i3lock-color.

* gnu/packages/wm.scm (i3lock-color): New variable.
* gnu/packages/patches/i3lock-color-fix-makefile.patch: New file
---
 gnu/local.mk                                       |  3 +
 .../patches/i3lock-color-fix-makefile.patch        | 38 ++++++++++
 gnu/packages/wm.scm                                | 80 +++++++++++++++++++++-
 3 files changed, 120 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 178ad3548..cd14ad046 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -679,6 +679,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/hubbub-sort-entities.patch		\
   %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch        \
   %D%/packages/patches/hydra-disable-darcs-test.patch		\
+  %D%/packages/patches/hypre-doc-tables.patch			\
+  %D%/packages/patches/hypre-ldflags.patch			\
+  %D%/packages/patches/i3lock-color-fix-makefile.patch          \
   %D%/packages/patches/icecat-avoid-bundled-libraries.patch	\
   %D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch	\
   %D%/packages/patches/icu4c-reset-keyword-list-iterator.patch	\
diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
new file mode 100644
index 000000000..8243dc548
--- /dev/null
+++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
@@ -0,0 +1,38 @@
+From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
+From: ng0 <ng0@no-reply.pragmatique.xyz>
+Date: Mon, 22 May 2017 18:22:19 +0000
+Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
+ build on Guix.
+
+---
+ Makefile | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c0fe888..b4b6cd9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
+ PKG_CONFIG=pkg-config
+ MANDIR=/usr/share/man
+ 
+-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
+-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
+-$(error "$(PKG_CONFIG) was not found")
+-endif
+-
+ CFLAGS += -std=c99
+ CFLAGS += -pipe
+ CFLAGS += -Wall
+@@ -18,7 +13,7 @@ CFLAGS += -O2
+ SIMD_CFLAGS += -funroll-loops
+ SIMD_CFLAGS += -msse2
+ CPPFLAGS += -D_GNU_SOURCE
+-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
++CPPFLAGS += -DXKBCOMPOSE=1
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += -lpam
+-- 
+2.13.0
+
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 607ef2b0e..7ea5673bd 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
 ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
 ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
@@ -65,6 +65,7 @@
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages lua)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages suckless)
   #:use-module (guix download)
   #:use-module (guix git-download))
@@ -332,6 +333,83 @@ and locate windows on all your workspaces, using an interactive dmenu
 prompt.")
       (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
 
+;; The last release is from 2015, use the git commit.
+(define-public i3lock-color
+  (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
+        (revision "1"))
+  (package
+    (name "i3lock-color")
+    (version (string-append "2.8-" revision "." (string-take commit 7)))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/chrjguill/i3lock-color")
+             (commit commit)))
+       (file-name (string-append name "-" version "-checkout"))
+       (snippet
+        ;; The Makefile is read-only, we are going to patch it.
+        '(chmod "Makefile" #o755))
+       (patches (search-patches "i3lock-color-fix-makefile.patch"))
+       (sha256
+        (base32
+         "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests included.
+       #:make-flags (list "CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man"))
+                    (etc (string-append out "/etc")))
+             (substitute* "Makefile"
+               (("PREFIX=/usr")
+                (string-append "PREFIX=" out))
+               (("SYSCONFDIR=/etc")
+                (string-append "SYSCONFDIR=" etc))
+               (("MANDIR=/usr/share/man")
+                (string-append "MANDIR=" man)))
+             #t)))
+         ;; (add-before 'build 'fix-pam-file
+         ;;   (lambda _
+         ;;     (substitute* "i3lock.pam"
+         ;;       (("login") "system-auth"))
+         ;;     #t))
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((i3lock (assoc-ref outputs "out"))
+                    (libev (string-append
+                             (assoc-ref inputs "libev") "/lib")))
+               (wrap-program (string-append i3lock "/bin/i3lock")
+                 `("LD_LIBRARY_PATH" suffix (, libev)))))))))
+    (inputs
+     `(("xcb-util-image" ,xcb-util-image)
+       ("xcb-util-keysyms" ,xcb-util-keysyms)
+       ("xcb-util" ,xcb-util)
+       ("libxcb" ,libxcb)
+       ("linux-pam" ,linux-pam)
+       ("libev" ,libev)
+       ("libx11" ,libx11)
+       ("cairo" ,cairo)))
+    (native-inputs
+     `(("libxkbcommon" ,libxkbcommon)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/chrjguill/i3lock-color")
+    (synopsis "Screenlocker with color configuration support")
+    (description
+     "I3lock-color is a screen locker.  It is a re-patched version of
+i3lock, which is a simple screen locker like slock.  Features include:
+
+@enumerate
+@item forking process, the locked screen is preserved when you suspend from RAM
+@item specify background color or PNG image to be displayed in the lock screen
+@item many additional color options
+@end enumerate\n")
+    (license license:bsd-3))))
+
 (define-public xmonad
   (package
     (name "xmonad")
-- 
2.13.0


[-- Attachment #3: 0002-gnu-Add-i3lock-fancy.patch --]
[-- Type: application/octet-stream, Size: 4171 bytes --]

From c79b0cdc921f86e4ca64367608a19ebbdb91bc4c Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 15:57:13 +0000
Subject: [PATCH 2/2] gnu: Add i3lock-fancy.

* gnu/packages/wm.scm (i3lock-fancy): New variable.
---
 gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 7ea5673bd..3d52caed6 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -41,6 +41,7 @@
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (gnu packages haskell)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages base)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
@@ -410,6 +411,76 @@ i3lock, which is a simple screen locker like slock.  Features include:
 @end enumerate\n")
     (license license:bsd-3))))
 
+(define-public i3lock-fancy
+  (package
+    (name "i3lock-fancy")
+    (version "0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;No tests included
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (icons (string-append out "/share/i3lock-fancy/icons/"))
+                    (i3lock (string-append (assoc-ref inputs "i3lock-color")
+                                           "/bin/i3lock"))
+                    (wmctrl (string-append (assoc-ref inputs "wmctrl")
+                                           "/bin/wmctrl"))
+                    (mconvert (string-append (assoc-ref inputs "imagemagick")
+                                             "/bin/convert"))
+                    (mimport (string-append (assoc-ref inputs "imagemagick")
+                                            "/bin/import"))
+                    (awk (string-append (assoc-ref inputs "gawk")
+                                        "/bin/gawk")))
+
+               (substitute* "lock"
+                 (("if ! i3lock") (string-append "if ! " i3lock))
+                 (("i3lock -n") (string-append i3lock " -n"))
+                 (("$(which wmctrl)") wmctrl)
+                 (("convert") mconvert)
+                 (("shot=\\(import") (string-append "shot=\(" mimport))
+                 (("awk -F") (string-append awk " -F"))
+                 ((" awk") awk)
+                 (("\\$scriptpath/icons/") icons))
+               #t)))
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (icons (string-append out "/share/i3lock-fancy/icons/")))
+
+               (install-file "lock" bin)
+               (rename-file (string-append bin "/lock")
+                            (string-append bin "/i3lock-fancy"))
+               (copy-recursively "icons" icons)
+               #t))))))
+    (native-inputs
+     `(("imagemagick" ,imagemagick)
+       ("i3lock-color" ,i3lock-color)
+       ("wmctrl" ,wmctrl)
+       ("gawk" ,gawk)))
+    (home-page "https://github.com/meskarune/i3lock-fancy")
+    (synopsis "Screenlocker with screenshot function")
+    (description
+     "@code{i3lock-fancy} is a Bash script that takes a screenshot of
+the desktop, blurs the background and adds a lock icon and text.
+It makes use of @code{i3lock-color} and can optionally be passed any
+screenshot util like @code{scrot}.  This screenlocker can be used with
+any window manager or desktop environment.")
+    (license license:expat)))
+
 (define-public xmonad
   (package
     (name "xmonad")
-- 
2.13.0


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

end of thread, other threads:[~2017-12-11 14:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 11:33 bug#27083: screen-lockers: i3lock-color and i3lock-fancy ng0
2017-11-17  9:55 ` [bug#27083] " Chris Marusich
2017-11-17 10:18   ` ng0
2017-11-17 20:17     ` ng0
2017-11-17 20:57       ` ng0
2017-11-17 21:02         ` ng0
2017-11-17 21:19           ` ng0
2017-11-19 11:04             ` ng0
2017-12-01  7:20             ` Chris Marusich
2017-12-01  9:27               ` ng0
2017-12-02  9:59                 ` Chris Marusich
2017-12-09 13:25                   ` ng0
2017-12-09 14:25                     ` ng0
2017-12-11 13:47                     ` Ludovic Courtès
2017-12-11 14:03                       ` ng0

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.